https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/awscli/examples/s3api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/awscli/examples/s3api/put-bucket-notification.rst
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"    
      }
     }
    }
   ]
  }

https://t.me/RX1948 - 2025