关于在RDS/Aurora PostgreSQL上创建数据库的警报

huangapple go评论59阅读模式
英文:

Alert about DB creation on RDS/Aurora PostgreSQL

问题

因为我们的AWS帐户上有一些Aurora PostgreSQL集群,由于一些访问问题(我们已经在处理中),其他团队的一些人会在这些Aurora集群上创建随机的数据库,然后我们需要清理它们。

我想查看是否有一种方式可以通过AWS工具本身来获得警报(通过SNS通知等),每当在这些AWS PostgreSQL集群上创建新的数据库时。

英文:

I have some Aurora PostgreSQL Clusters created on our AWS account. Because of some access issues (which we are working on already), there are several people in other teams who create random DB's on these Aurora Clusters and then we need to work on cleaning them up.

I wanted to check if there is a way to get alerted (via SNS Notifications etc.) whenever a new DB is created on these AWS Postgres clusters using some AWS Tools itself.

Thanks

答案1

得分: 1

你可以使用AWS Aurora数据库活动流来实现这一点,它将捕获数据库上的所有数据库活动并将其发送到AWS Kinesis数据流,然后你可以创建一个AWS Lambda函数来读取Kinesis数据流并识别所需的事件(例如创建数据库),最后从AWS Lambda代码向AWS SNS发送通知。

另一个选项是在AWS Aurora PostgreSQL上启用pgaudit,将日志发送到AWS CloudWatch,创建AWS Lambda来读取来自AWS CloudWatch的事件并发送AWS通知。

你可以在AWS博客的以下步骤中找到详细信息:

第2部分:使用数据库活动流和pgAudit审计Aurora PostgreSQL数据库

英文:

You could do it using AWS Aurora Database Activity Streams, it will capture all database activity on the database and send it AWS Kinesis Data Stream and you could create a AWS Lambda function to read Kinesis Data Stream and identify the events needed (ex. create database)and finally send notification to AWS SNS from AWS Lambda code.

Another option is enable pgaudit on your AWS Aurora PostgreSQL, send logs to AWS CloudWatch, create AWS Lambda to read the events from AWS CloudWatch and send AWS Notification

Below you can find step by step on AWS Blog below.

Part 2: Audit Aurora PostgreSQL databases using Database Activity Streams and pgAudit

huangapple
  • 本文由 发表于 2023年2月16日 03:44:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75464752.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定