View a markdown version of this page

Destination bucket policy for your metrics exports - Amazon Simple Storage Service

Destination bucket policy for your metrics exports

To let Amazon S3 Storage Lens for Tables deliver your metrics exports to an S3 general purpose bucket in your account, add a bucket policy to the destination bucket that grants the service principal permission to write the export files. To use this policy, replace the user input placeholders with your information.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowStorageLensForTablesExportDelivery", "Effect": "Allow", "Principal": { "Service": "storage-lens.s3tables.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::amzn-s3-demo-destination-bucket/prefix-for-your-export-destination/*", "Condition": { "StringEquals": { "aws:SourceArn": "arn:aws:s3tables:us-east-1:source-account-id:storage-lens/your-dashboard-name", "aws:SourceAccount": "source-account-id", "s3:x-amz-acl": "bucket-owner-full-control" } } } ] }
Note

The destination bucket policy grants the storage-lens.s3tables.amazonaws.com service principal permission to deliver your exports, and the aws:SourceArn condition references the Amazon S3 Storage Lens for Tables configuration ARN in the s3tables namespace, as shown in the preceding policy.