{Aurora}データベースアクティビティストリームの開始


Aurora MySQL では、db.t2 インスタンスクラス または db.t3 インスタンスクラスではストリームを使用できません。
Aurora PostgreSQL の場合、ストリームは db.r4 または db.r5 インスタンスクラスでのみ使用します。

アクティビティのストリームは、収集後、Amazon Kinesis に送信されます。Kinesis から、アクティビティストリームをモニタリングしたり、
他のサービスやアプリケーションがアクティビティストリームを使用して詳細な分析を行うことができます

データベースアクティビティストリームを停止するか、DB クラスターを削除すると、Aurora によって Kinesis ストリームが削除されます。


-- KMSコンソールでカスタマー管理型のキー作成


-- アクティビティストリームの開始

aws rds start-activity-stream \
--region ap-northeast-1 \
--mode async \
--kms-key-id arn:aws:kms:ap-northeast-1:999999999999:key/11111111-2222-3333-4444-555555555555 \
--resource-arn arn:aws:rds:ap-northeast-1:999999999999:cluster:cluster01 \
--apply-immediately


-- アクティビティストリームのステータスの取得
aws rds describe-db-clusters \
--region ap-northeast-1 | jq -c '.DBClusters | [.DBClusterIdentifier , .ActivityStreamStatus]'

-- アクティビティストリームの停止

aws rds stop-activity-stream \
--region ap-northeast-1 \
--resource-arn arn:aws:rds:ap-northeast-1:999999999999:cluster:cluster01 \
--apply-immediately

 

-- KMSコンソールでカスタマー管理型のキー作成


-- アクティビティストリームの開始

aws rds start-activity-stream \
--region ap-northeast-1 \
--mode async \
--kms-key-id arn:aws:kms:ap-northeast-1:999999999999:key/11111111-2222-3333-4444-555555555555 \
--resource-arn arn:aws:rds:ap-northeast-1:999999999999:cluster:cluster02 \
--apply-immediately


-- アクティビティストリームのステータスの取得
aws rds describe-db-clusters \
--region ap-northeast-1 | jq -c '.DBClusters | [.DBClusterIdentifier , .ActivityStreamStatus]'


-- アクティビティストリームの停止

aws rds stop-activity-stream \
--region ap-northeast-1 \
--resource-arn arn:aws:rds:ap-northeast-1:999999999999:cluster:cluster02 \
--apply-immediately