- Newest
- Most votes
- Most comments
Based on the information provided, there are a few potential issues causing your 403 Forbidden errors when trying to index documents into your OpenSearch Serverless collection.
The most likely issue is that your IAM policy is missing the required aoss:DashboardsAccessAll permission. According to AWS documentation, a principal must have both aoss:APIAccessAll and aoss:DashboardsAccessAll permissions to properly access OpenSearch Serverless collections. Without both of these permissions, you'll receive 403 errors when attempting to send requests to the collection, even if your data access policy is correctly configured.
Your current IAM policy includes:
aoss:APIAccessAllaoss:ListCollectionsaoss:GetAccessPolicy
But it's missing the critical aoss:DashboardsAccessAll permission.
Additionally, for index-specific operations, make sure that your data access policy contains the correct permissions for both the collection and index resources, and that the policy contains the correct IAM identity in the Principal section. Double-check that the ARN in your Principal section matches exactly with the IAM user you're using.
For the network policy, ensure that "Enable access to OpenSearch Dashboards" is turned on if you're trying to access it from the public internet. This setting is disabled by default and could be contributing to your access issues.
If you're still experiencing issues after adding the missing permission, verify that your requests include the correct API version and resource name in your requests to the endpoint.
Sources
Troubleshoot OpenSearch Serverless errors | AWS re:Post
Getting a 401 when trying to access OpenSearch serverless dashboard | AWS re:Post
Data access control for Amazon OpenSearch Serverless - Amazon OpenSearch Service
AuthorizationException(403, 'Forbidden') | AWS re:Post
Relevant content
asked 4 years ago
asked 2 years ago
asked 3 years ago
