Receiving S3 on Outposts event notifications by using Amazon CloudWatch Events
You can use CloudWatch Events to create a rule for any Amazon S3 on Outposts API event. When you create a rule, you can choose to get notified through all supported CloudWatch targets, including Amazon Simple Queue Service (Amazon SQS), Amazon Simple Notification Service (Amazon SNS), and AWS Lambda. For more information, see the list of AWS services that can be targets for CloudWatch Events in the Amazon CloudWatch Events User Guide. To choose a target service to work with your S3 on Outposts, see Creating a CloudWatch Events rule that triggers on an AWS API call using AWS CloudTrail in the Amazon CloudWatch Events User Guide.
Note
For S3 on Outposts object operations, AWS API call events sent by CloudTrail will match your rules only if you have trails (optionally with event selectors) configured to receive those events. For more information, see Working with CloudTrail log files in the AWS CloudTrail User Guide.
The following is a sample rule for the DeleteObject
operation. To use
this sample rule, replace
with the name of your S3 on Outposts
bucket. amzn-s3-demo-bucket1
{ "source": [ "aws.s3-outposts" ], "detail-type": [ "AWS API call through CloudTrail" ], "detail": { "eventSource": [ "s3-outposts.amazonaws.com" ], "eventName": [ "DeleteObject" ], "requestParameters": { "bucketName": [ "
amzn-s3-demo-bucket1
" ] } } }