QuestionQ117

VerifiedAI Safety, Security, and Governance

A financial services company is building an AI-powered search assistant to help investment advisors quickly retrieve investment data. The application runs as an AWS Lambda function and uses Amazon Bedrock, specifically an Amazon Bedrock knowledge base backed by Amazon OpenSearch Serverless as its data source.

The application agent must manage collections at scale by automatically assigning access permissions to collections and indexes that match a specific pattern.

While testing the knowledge base with Amazon Bedrock tools, the knowledge base sync process completes successfully. However, testing reveals:

  • A 400 Bad Authorization error from the BedrockAgentRuntime API
  • A 403 Forbidden error when attempting to access OpenSearch Serverless

The company needs to resolve these permissions issues.

Which combination of solutions will meet this requirement?

Choose two
Explanation

The Lambda function's IAM execution role must include bedrock:InvokeAgent so it is authorized to call the BedrockAgentRuntime API (resolving the 400 Bad Authorization error), and it must also include aoss:APIAccessAll, since AWS OpenSearch Serverless requires this specific IAM permission on top of any data access policy grants — without it, callers receive 403 Forbidden errors when accessing collections. Separately, OpenSearch Serverless data access policies natively support pattern-based (prefix + wildcard) resource rules for both collection and index resource types, which is exactly how AWS enables managing access at scale by automatically applying permissions to any new or existing collections/indexes whose names match a defined pattern. VPC endpoint policies address network path access rather than these authorization/authentication errors, Secrets Manager is not used for OpenSearch Serverless credentials since it relies on IAM-based auth, and es:ESHttp* permissions apply to standard (non-serverless) OpenSearch domains rather than OpenSearch Serverless collections.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!