Amazon RDS 事件概述 - Amazon Relational Database Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

Amazon RDS 事件概述

RDS 事件表示 RDS 环境中的更改。例如,实例状态从挂起变为正在运行时,Amazon RDS 将生成事件。Amazon RDS 近乎实时地将事件发送至 CloudWatch Events 和 EventBridge。

注意

Amazon RDS 尽最大努力发出事件。我们建议您避免编写取决于通知事件的顺序或存在的程序,因为它们可能是乱序或缺失的。

Amazon RDS 将记录数据库实例、数据库快照、数据库安全组和数据库参数组相关的事件。这些信息包含:

  • 事件的日期和时间

  • 事件的源名称和源类型

  • 与事件关联的消息。

数据库实例事件的示例

以下是采用 JSON 格式的数据库实例事件的示例。该事件显示,RDS 为名为 my-db-instance 的实例执行了多可用区故障转移。事件 ID 为 RDS-EVENT-0049。

{ "version": "0", "id": "68f6e973-1a0c-d37b-f2f2-94a7f62ffd4e", "detail-type": "RDS DB Instance Event", "source": "aws.rds", "account": "123456789012", "time": "2018-09-27T22:36:43Z", "region": "us-east-1", "resources": [ "arn:aws-cn:rds:us-east-1:123456789012:db:my-db-instance" ], "detail": { "EventCategories": [ "failover" ], "SourceType": "DB_INSTANCE", "SourceArn": "arn:aws-cn:rds:us-east-1:123456789012:db:my-db-instance", "Date": "2018-09-27T22:36:43.292Z", "Message": "A Multi-AZ failover has completed.", "SourceIdentifier": "rds:my-db-instance", "EventID": "RDS-EVENT-0049" } }

数据库参数组事件的示例

以下是采用 JSON 格式的数据库参数组事件的示例。该事件显示参数 time_zone 已在参数组 my-db-param-group 中更新。事件 ID 为 RDS-EVENT-0037。

{ "version": "0", "id": "844e2571-85d4-695f-b930-0153b71dcb42", "detail-type": "RDS DB Parameter Group Event", "source": "aws.rds", "account": "123456789012", "time": "2018-10-06T12:26:13Z", "region": "us-east-1", "resources": [ "arn:aws-cn:rds:us-east-1:123456789012:pg:my-db-param-group" ], "detail": { "EventCategories": [ "configuration change" ], "SourceType": "DB_PARAM", "SourceArn": "arn:aws-cn:rds:us-east-1:123456789012:pg:my-db-param-group", "Date": "2018-10-06T12:26:13.882Z", "Message": "Updated parameter time_zone to UTC with apply method immediate", "SourceIdentifier": "rds:my-db-param-group", "EventID": "RDS-EVENT-0037" } }

数据库安全组事件的示例

以下是采用 JSON 格式的数据库安全组事件的示例。该事件显示安全组 my-security-group 已修改。事件 ID 为 RDS-EVENT-0038。

{ "version": "0", "id": "844e2571-85d4-695f-b930-0153b71dcb42", "detail-type": "RDS DB Security Group Event", "source": "aws.rds", "account": "123456789012", "time": "2018-10-06T12:26:13Z", "region": "us-east-1", "resources": [ "arn:aws-cn:rds:us-east-1:123456789012:secgrp:my-security-group" ], "detail": { "EventCategories": [ "configuration change" ], "SourceType": "SECURITY_GROUP", "SourceArn": "arn:aws-cn:rds:us-east-1:123456789012:secgrp:my-security-group", "Date": "2018-10-06T12:26:13.882Z", "Message": "Applied change to security group", "SourceIdentifier": "rds:my-security-group", "EventID": "RDS-EVENT-0038" } }

数据库快照事件的示例

以下是采用 JSON 格式的数据库快照事件的示例。该事件显示删除名 my-db-snapshot 为的快照。事件 ID 为 RDS-EVENT-0041。

{ "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-cn:rds:us-east-1:123456789012:snapshot:rds:my-db-snapshot" ], "detail": { "EventCategories": [ "deletion" ], "SourceType": "SNAPSHOT", "SourceArn": "arn:aws-cn:rds:us-east-1:123456789012:snapshot:rds:my-db-snapshot", "Date": "2018-10-06T12:26:13.882Z", "Message": "Deleted manual snapshot", "SourceIdentifier": "rds:my-db-snapshot", "EventID": "RDS-EVENT-0041" } }