SetBucketAccessControlPolicy (SOAP API) - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

SetBucketAccessControlPolicy (SOAP API)


SOAP support over HTTP is deprecated, but it is still available over HTTPS. New Amazon S3 features will not be supported for SOAP. We recommend that you use either the REST API or the Amazon SDKs.

The SetBucketAccessControlPolicy operation sets the Access Control Policy for an existing bucket. If successful, the previous Access Control Policy for the bucket is entirely replaced with the specified Access Control Policy.


Give the specified user (usually the owner) FULL_CONTROL access to the "quotes" bucket.

Sample Request

<SetBucketAccessControlPolicy xmlns=""> <Bucket>quotes</Bucket> <AccessControlList> <Grant> <Grantee xsi:type="CanonicalUser"> <ID>a9a7b8863000e241bf9b1c61be666e9</ID> <DisplayName>chriscustomer</DisplayName> </Grantee> <Permission>FULL_CONTROL</Permission> </Grant> </AccessControlList> <AWSAccessKeyId>AKIAIOSFODNN7EXAMPLE</AWSAccessKeyId> <Timestamp>2006-03-01T12:00:00.183Z</Timestamp> <Signature>Iuyz3d3P0aTou39dzbqaEXAMPLE=</Signature> </SetBucketAccessControlPolicy >

Sample Response

<GetBucketAccessControlPolicyResponse xmlns=""> <GetBucketAccessControlPolicyResponse> <Code>200</Code> <Description>OK</Description> </GetBucketAccessControlPolicyResponse> </GetBucketAccessControlPolicyResponse>

Access Control

You must have WRITE_ACP rights to the bucket in order to set the access control policy for a bucket.