0

I have an S3 bucket and I want to append notification events and remove just specific notification events using awscli.

At the first time, I tried s3api put-bucket-notification-configuration, however, It just replaces all s3 notification events, deleting existing s3 notification events(I expected it just appends new notification events into existing one.)

How to accomplish it?

SangminKim
  • 8,358
  • 14
  • 69
  • 125

2 Answers2

0

When trying to configuring overlapping events in the console, I got this message:

Configurations on the same bucket cannot share a common event type.

It appears that you cannot create multiple notifications for the same event (eg ObjectCreate) but you can still have separate notifications for Create and Delete.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
0

The S3 API does not allow modification of the JSON for the notification configuration. You have to retrieve it, programatically modify it and then place it back in the bucket's config.

The library module in this answer will do what you want. :)

Juan Jimenez
  • 443
  • 4
  • 18