| Server IP : 172.67.134.114 / Your IP : 162.159.115.41 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/awscli/examples/s3api/ |
Upload File : |
The applies a notification configuration to a bucket named ``my-bucket``::
aws s3api put-bucket-notification --bucket my-bucket --notification-configuration file://notification.json
The file ``notification.json`` is a JSON document in the current folder that specifies an SNS topic and an event type to monitor::
{
"TopicConfiguration": {
"Event": "s3:ObjectCreated:*",
"Topic": "arn:aws:sns:us-west-2:123456789012:s3-notification-topic"
}
}
The SNS topic must have an IAM policy attached to it that allows Amazon S3 to publish to it::
{
"Version": "2008-10-17",
"Id": "example-ID",
"Statement": [
{
"Sid": "example-statement-ID",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": [
"SNS:Publish"
],
"Resource": "arn:aws:sns:us-west-2:123456789012:my-bucket",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:*:*:my-bucket"
}
}
}
]
}