Free Coder
Free Coder

Reputation: 487

Customizing / Updating the Default S3 bucket notification message

We are planning to use s3 bucket event notification to use for further processing. Our requirement is,

  1. When an object is PUT / POST / COPY to s3 bucket, an event notification is generated.
  2. The destination for this generated event notification is SQS.

We have tested 1st and 2nd part. But we are not getting an idea about how to customize the the default notification content to suit our processing.

We went thorough AWS dev guide. But, we could not find the expected solution.

Upvotes: 0

Views: 739

Answers (1)

Frederic Henri
Frederic Henri

Reputation: 53733

The s3 event notification does not contain something like subject or message so I dont think you can change much of the generated JSON (see http://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html)

Each notification is delivered as a JSON object with the following fields:

  • Region Timestamp
  • Event Type (PUT/COPY ...)
  • Request Actor Principal
  • ID Source IP of the request Request
  • ID Host ID Notification
  • Configuration Destination ID
  • Bucket Name
  • Bucket ARN
  • Bucket Owner
  • Principal ID
  • Object Key
  • Object Size
  • Object ETag
  • Object Version ID (if versioning is enabled on the bucket)

You might have better chance to send a custom notification by running a lambda function (http://docs.aws.amazon.com/lambda/latest/dg/with-s3.html)

Upvotes: 1

Related Questions