CloudWatchLogsをS3に退避する際に利用。
エクスポート先のS3バケットを準備します。
対象S3バケットの[アクセス許可]-[バケットポリシー]に設定します。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "logs.[REGION-NAME].amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::[BUCKET-NAME]"
},
{
"Effect": "Allow",
"Principal": {
"Service": "logs.[REGION-NAME].amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::[BUCKET-NAME]/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
}
]
}
CloudWatch > ロググループ から、ロググループを選択し
[アクションメニュー] - [データをAmazon S3にエクスポート] を選択する。
上記で作成したS3バケットを選択し、[データのエクスポート]をクリックする。