You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/object-storage/troubleshooting/api-key-does-not-work.mdx
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ content:
7
7
paragraph: Fix issues with non-functional API keys in Object Storage.
8
8
tags: api key bucket object storage aws cli
9
9
dates:
10
-
validation: 2025-01-15
10
+
validation: 2025-01-30
11
11
posted: 2023-12-15
12
12
categories:
13
13
- storage
@@ -26,6 +26,8 @@ When using third-party API or CLI tools, such as the [AWS CLI](/object-storage/a
26
26
27
27
- The tool returns `An error occurred (Forbidden) when calling the ListObjectsV2 operation: Forbidden` or a similar message.
28
28
29
+
- The tool returns a `403` error.
30
+
29
31
## Cause
30
32
31
33
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
34
36
35
37
## Solution
36
38
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.
38
42
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.
41
47
42
48
You should now be able to list your buckets using a supported Amazon Amazon S3-compatible third-party tool.
43
49
44
50
## Going further
45
51
46
52
- Refer to the documentation on [using IAM API keys with Object Storage](/iam/api-cli/using-api-key-object-storage/) for more information.
47
53
54
+
- Refer to the documentation on [bucket policies](/object-storage/api-cli/bucket-policy/) for more information.
55
+
48
56
- 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:
0 commit comments