CloudTrail 事件中的 AWS 自动 DBSnapshot(系统)

AWS Automated DBSnapshot (System) in CloudTrail event

我正在考虑在 RDS 中提供新的自动数据库快照(系统快照而不是手动快照)时触发 lambda。尽管在 CloudTrail 中挖掘之后,我没有看到任何标记为以下的事件(AWS 示例):

{
  "version": "0",
  "id": "844e2571-85d4-695f-b930-0153b71dcb42",
  "detail-type": "RDS DB Snapshot Event",
  "source": "aws.rds",
  "account": "123456789012",
  "time": "2018-10-06T12:26:13Z",
  "region": "us-east-1",
  "resources": ["arn:aws:rds:us-east-1:123456789012:db:mysql-instance-2018-10-06-12-24"],
  "detail": {
    "EventCategories": ["creation"],
    "SourceType": "SNAPSHOT",
    "SourceArn": "arn:aws:rds:us-east-1:123456789012:db:mysql-instance-2018-10-06-12-24",
    "Date": "2018-10-06T12:26:13.882Z",
    "SourceIdentifier": "rds:mysql-instance-2018-10-06-12-24",
    "Message": "Automated snapshot created"
  }
}

再次感谢您知道我应该查找哪些 AWS 事件:)

奥利

Cloudtrail 不会为您提供此类信息。我会选择下面突出显示的流程

RDS(事件通知)-> SNS -> Lambda

您需要将 SNS 主题作为 lambda 的来源,因为 RDS 将其事件散布到此服务

查看什么RDS文件states

Amazon RDS uses the Amazon Simple Notification Service (Amazon SNS) to provide notification when an Amazon RDS event occurs

关于通知本身,我可以看到下面的 DB snapshot event 事件可能就是您正在寻找的事件

Category RDS event ID Description
creation RDS-EVENT-0091 An automated DB snapshot is being created.