Bucket Policy
GET https://s3.amazonaws.com/{{bucket}}/?policy
Returns the policy of a specified 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 GetBucketPolicy 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 |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
x-amz-content-sha256 | string |
RESPONSES
status: OK
{"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"}}}]}