Skip to content

Commit 5ae03c9

Browse files
committed
docs(obj): update api key troubleshooting MTA-5528
1 parent a7970fa commit 5ae03c9

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

pages/object-storage/troubleshooting/api-key-does-not-work.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: Fix issues with non-functional API keys in Object Storage.
88
tags: api key bucket object storage aws cli
99
dates:
10-
validation: 2025-01-15
10+
validation: 2025-01-30
1111
posted: 2023-12-15
1212
categories:
1313
- storage
@@ -26,6 +26,8 @@ When using third-party API or CLI tools, such as the [AWS CLI](/object-storage/a
2626

2727
- The tool returns `An error occurred (Forbidden) when calling the ListObjectsV2 operation: Forbidden` or a similar message.
2828

29+
- The tool returns a `403` error.
30+
2931
## Cause
3032

3133
The API key you used to configure the Amazon S3 third-party tool has a [preferred Project](/iam/concepts/#preferred-project) assigned.
@@ -34,17 +36,23 @@ If you try to perform Object Storage operations in a Project that is **NOT** the
3436

3537
## Solution
3638

37-
You can change the preferred project of your API key:
39+
1. Make sure that you are using a valid [API key](https://console.scaleway.com/iam/api-keys).
40+
41+
2. Make sure that the bearer of the API key (IAM [user](/iam/concepts/#user) or [application](/iam/concepts/#application)) has the appropriate [IAM permissions](/iam/how-to/view-permission-sets/) to perform the desired actions.
3842

39-
- by editing it from the [Scaleway console](/iam/how-to/manage-api-keys/#how-to-edit-an-api-key)
40-
- by [overriding it while making an API call](/iam/api-cli/using-api-key-object-storage/#overriding-the-preferred-project-when-making-a-call)
43+
3. Make sure that the API key's [preferred Project](/iam/concepts/#preferred-project) is the same as the one where you are performing actions. You can change the preferred project of your API key:
44+
- by editing it from the [Scaleway console](/iam/how-to/manage-api-keys/#how-to-edit-an-api-key)
45+
- by [overriding it while making an API call](/iam/api-cli/using-api-key-object-storage/#overriding-the-preferred-project-when-making-a-call)
46+
4. Make sure that there is no [bucket policy](/object-storage/concepts/#bucket-policy) preventing the action. If there is one, [update the bucket policy](/object-storage/how-to/create-bucket-policy/) to allow the desired actions to the bearer of the API key.
4147

4248
You should now be able to list your buckets using a supported Amazon Amazon S3-compatible third-party tool.
4349

4450
## Going further
4551

4652
- Refer to the documentation on [using IAM API keys with Object Storage](/iam/api-cli/using-api-key-object-storage/) for more information.
4753

54+
- Refer to the documentation on [bucket policies](/object-storage/api-cli/bucket-policy/) for more information.
55+
4856
- If you did not manage to identify the error and solve it by yourself, [open a support ticket](/account/how-to/open-a-support-ticket/), and provide as many details as possible, along with the necessary information below:
4957
- Object Storage Endpoint (e.g. `s3.fr-par.scw.cloud`)
5058
- Bucket name

0 commit comments

Comments
 (0)