Deleting a Bucket Policy

You can delete a policy from a bucket at any time to remove the permissions it grants to a specific user or group.

Deleting a Bucket Policy using AWS CLI (s3api)

To delete a policy from a bucket, use the delete-bucket-policy command following this syntax:

Request sample
$ aws s3api delete-bucket-policy \
    --profile YOUR_PROFILE \
    --bucket BUCKET \
    --endpoint https://oos.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • bucket: The name of the bucket whose policy you want to delete.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The policy is deleted from the bucket.

Related Pages

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.