Bucket Policy
PUT https://s3.amazonaws.com/{{bucket}}/?policy
Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the PutBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
policy | null |
Request Body
{"Version"=>"2012-10-17", "Id"=>"S3-Console-Auto-Gen-Policy-1573968487385", "Statement"=>[{"Sid"=>"S3PolicyStmt-DO-NOT-MODIFY-1573968487385", "Effect"=>"Allow", "Principal"=>{"Service"=>"s3.amazonaws.com"}, "Action"=>"s3:PutObject", "Resource"=>"arn:aws:s3:::working-demo-2/*", "Condition"=>{"StringEquals"=>{"aws:SourceAccount"=>"879370021840", "s3:x-amz-acl"=>"bucket-owner-full-control"}, "ArnLike"=>{"aws:SourceArn"=>"arn:aws:s3:::working-demo-2"}}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-MD5 | string | ||
x-amz-confirm-remove-self-bucket-access | string |