- Newest
- Most votes
- Most comments
Based on the information provided, there are a few potential reasons for the 403 Forbidden error you're encountering with your OpenSearch deployment:
-
OpenSearch Service API permissions: Starting May 10, 2023, OpenSearch Service requires two additional IAM permissions for collection resources. These are 'aoss:APIAccessAll' for data plane access and 'aoss:DashboardsAccessAll' for OpenSearch Dashboards access from the browser. If these permissions are not added to your IAM role, it could result in a 403 error.
-
Request signing: Ensure that your requests to the OpenSearch domain are properly signed. OpenSearch Service requires requests to be signed using Sigv4 with an access key ID and a secret access key associated with an IAM principal. Alternatively, you can use AWS Security Token Service (AWS STS) to generate temporary security credentials for signing requests.
-
TLS version: OpenSearch Service requires TLS 1.2 or higher. Ensure that your client is using a compatible TLS version. You can configure the minimum required TLS version using the 'TLSSecurityPolicy' value in the domain endpoint options.
-
Fine-grained access control: If fine-grained access control is enabled on your OpenSearch domain, make sure that the IAM role has the necessary permissions at the index, document, or field level.
-
VPC access: If your OpenSearch domain is configured for VPC access, ensure that your application is running within the same VPC or has proper network connectivity to the VPC where the OpenSearch domain is deployed.
-
Domain access policy: Double-check the access policy for the OpenSearch domain. It should explicitly allow access to the IAM role you're using.
To troubleshoot further:
- Review the CloudTrail logs for any denied actions related to OpenSearch.
- Use the AWS CLI to test access to the OpenSearch APIs directly.
- Verify that the IAM role is correctly assumed by your application.
- Compare the full IAM policy, including any attached AWS managed policies, between the working and non-working accounts.
If the issue persists after checking these points, you may need to contact AWS support for further assistance, as there could be account-specific configurations or limitations that are not immediately apparent.
Sources
Open-Source Search Engine – Amazon OpenSearch Service Security – Amazon Web Services
Infrastructure security in Amazon OpenSearch Service - Amazon OpenSearch Service
Identity and Access Management for Amazon OpenSearch Serverless - Amazon OpenSearch Service
Relevant content
- asked 2 years ago
- asked 2 years ago
