Skip to content

I have questions about OpenSearch, indexing, and data creation.

0

I have completed creating OpenSearch Serverless.

I am getting a 403 forbidden error when creating an index and data.

After creating an access key and secret key in AWS IAM, aws signature auth: the information + region (Korea-Seoul) + aoss body: { "name": "Shampoo", "brand": "L'Oréal", "category": "Haircare", "features": ["Oily", "Scalpcare"], "score": { "brand": 1, "features": 2, "category": 3 } }

I am requesting as above and trying to accumulate data. (Index is also a similar method)

Is the business concept itself wrong?

2 Answers
1
Accepted Answer

The approach you're taking to create an index and add data to OpenSearch Serverless is generally correct, but there are a few points to consider that might be causing the 403 Forbidden error:

  1. Authentication: While you've created an access key and secret key in AWS IAM, ensure that the IAM user or role associated with these credentials has the necessary permissions to interact with OpenSearch Serverless. You may need to attach appropriate policies that allow actions on your OpenSearch Serverless collection.

  2. Collection Endpoint: Make sure you're using the correct endpoint for your OpenSearch Serverless collection. The endpoint should be specific to your collection in the Korea-Seoul region.

  3. API Compatibility: OpenSearch Serverless uses the OpenSearch API. Ensure you're using the correct API calls for index creation and data insertion.

  4. Index Naming: If you're creating a new index, remember that OpenSearch has specific naming conventions. Index names must be lowercase, cannot start with underscores or hyphens, and cannot contain certain special characters.

  5. Data Format: The JSON structure you've provided for the document looks correct. However, ensure that when you're sending this data, you're using the correct API call (e.g., POST or PUT to the correct endpoint).

  6. Network Access: Check if you have the necessary network access policies configured for your OpenSearch Serverless collection. You may need to set up a data access policy that allows your client's IP or VPC to access the collection.

The business concept itself doesn't seem to be the issue. The structure of your data (with name, brand, category, features, and scores) is valid for OpenSearch. The problem is more likely related to authentication, permissions, or network access.

To troubleshoot:

  1. Double-check your IAM permissions.
  2. Verify you're using the correct collection endpoint.
  3. Ensure your network has access to the OpenSearch Serverless collection.
  4. Review the OpenSearch API documentation to confirm you're using the correct API calls for index creation and data insertion.

If the issue persists after checking these points, you may need to review the CloudWatch logs for your OpenSearch Serverless collection or contact AWS support for more detailed troubleshooting.
Sources
How to create and configure an Open Search Serverless index via API? | AWS re:Post
Indexing data in Amazon OpenSearch Service - Amazon OpenSearch Service
Upload data to Amazon OpenSearch Service for indexing - Amazon OpenSearch Service

answered 2 years ago

EXPERT

reviewed 2 years ago

0

Still not sure Can you give me an example? Or can I ask you a question based on the data in my account?

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.