I lost access to a bucket after applying a bucket policy
Before you start
To complete the actions presented below, you must have:
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
Problem
When creating and applying a bucket policy to a bucket, you may lose access to the resources within the bucket if your bucket policy was not set properly.
Bucket policies automatically deny actions to users who are not explicitly allowed by a statement.
Cause
If you are not explicitly allowed access to the resources in your bucket, you may see one of the following messages:
-
[CLI] -
An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
-
[CLI] -
403 AccessDenied
-
[Console] -
Failed to update bucket. Retry.
-
[Console] -
Failed to load data. Try refreshing the page.
Solution
Going further
-
Refer to the bucket policies overview for more information on the different elements of a bucket policy.
-
If you did not manage to identify the error and solve it by yourself, open a support ticket, and provide as many details as possible, along with the necessary information below:
- Object Storage Endpoint (e.g.
s3.fr-par.scw.cloud
) - Bucket name
- Object name (if the request concerns an object)
- Request type (PUT, GET, etc.)
- HTTP status code
- Date and time (timestamp)
- User-agent (SDK, client, console, etc.)
- Transaction ID (if possible)
- Log / trace of the error (if possible)
- Object Storage Endpoint (e.g.