- Newest
- Most votes
- Most comments
For guidance on IAM user and role creation, please refer to this video: https://www.youtube.com/watch?v=KeUBwm-aalU. Then I used Postman for the API calls to resolve the issue.
This error indicates a permissions issue where your user doesn't have the necessary permissions to create a snapshot repository in OpenSearch. The error specifically shows that the user "arn:aws-us-gov:iam::123456789012:user/opensearch-repo-user" lacks the "cluster:admin/repository/put" permission required for this operation.
Since you have fine-grained access control enabled with an internal user database, you need to ensure that the user making the request has the appropriate role mappings. Here are some steps to resolve this issue:
-
Log in to OpenSearch Dashboards as an admin user.
-
Check your existing role mappings by running:
GET _plugins/_security/api/rolesmapping
-
Verify that your user (opensearch-repo-user) is properly mapped to a role that has snapshot permissions. The role mappings are case-sensitive, so ensure they exactly match the values in your configuration.
-
If the mappings don't exist or are incorrect, you need to create or update the role mappings to grant your user the necessary permissions for snapshot operations.
-
Make sure the role you're mapping to has the "cluster:admin/repository/put" permission, which is required for creating snapshot repositories.
Remember that even though you signed in with an IAM user that has administrative access, OpenSearch's fine-grained access control operates independently of IAM permissions. You need to explicitly grant the necessary permissions within OpenSearch's security model.
If you've already mapped the snapshot role as you mentioned, double-check that the mapping is correct and that the role has the specific permission needed for this operation.
Sources
Create and schedule manual snapshots in OpenSearch Service | AWS re:Post
Configure SAML 2.0 authentication in OpenSearch Service | AWS re:Post
answered 10 months ago
Relevant content
asked 2 years ago
