The Bedrock Builder CDK L3 construct is used to configure and deploy a secure Bedrock Builder and associated resources.

Bedrock Builder: Deploys Amazon Bedrock Component(s) to streamline workflows and/or automate repetitive tasks using Foundational Models
Bedrock Execution Policies: For Knowledge Bases, the construct creates consolidated IAM policies per execution role:
Policies are consolidated per role - multiple KBs sharing the same role share the same 3 policies to avoid hitting the AWS limit of 10 managed policies per role.
Bedrock Execution Role: Execution policies are attached to the KB execution role. This role should have Bedrock Service as a Trusted Principal.
Bedrock KMS Key: Encrypt Bedrock resources with the KMS Key. One will be generated if a KMS key is not provided as part of Configuration
Lambdas: (Optional) Allows you to generate Lambda Layer, Lambda Function or both, which gateway targets, gateway interceptors, and knowledge base custom transformations reference with the generated-function:<name> prefix. (Refer: MDAA DataOps-LambdaFunctions)
May be optionally VPC bound with configurable VPC, Subnet, and Security Group Parameters
Can use an existing security group (from Project, for instance), or create a new security group per function
If creating a per-function security group:
Bedrock Guardrail: (Optional) Deploys Bedrock Guardrails, which a harness can reference by config:<name>.
interventionAlarm gets CloudWatch alarms on its intervention count and/or rate, across every guardrail version. Every such alarm notifies the module-level guardrailAlarms target: an existing SNS topic, or a topic the module creates, encrypted with the module KMS key, with optional email subscriptions. See Guardrail intervention alarms.OpenSearch Serverless VPC Endpoints: For OpenSearch Serverless vector stores, the construct automatically creates VPC endpoints for secure connectivity. If you already have an existing VPC endpoint for OpenSearch Serverless in your VPC, you can provide the endpoint ID and security group ID in the vector store configuration to reuse it instead of creating a new one. This prevents deployment failures when a VPC endpoint already exists.
AgentCore Harness(es): (Optional) Deploys one or more AWS::BedrockAgentCore::Harness resources - a declarative agent loop (model + system prompt + tools). Configured via the top-level harnesses map.
guardrail.id and tools[].agentCoreGateway.gatewayArn may reference a guardrail or gateway defined elsewhere in the same module via a config:<name> reference (resolved to the live guardrail id/version or gateway ARN), or a literal id/ARN.inline_function and agentcore_gateway tools, VPC networking, and context truncation - see @aws-mdaa/bedrock-agentcore-harness-l3-construct for the full configuration surface.Knowledge Base Gateway Connector(s): (Optional) For each knowledgeBase gateway target, deploys a Lambda connector, with its own execution role and log group and optionally in your VPC, that calls bedrock-agent-runtime:Retrieve on one knowledge base, and registers it as a Lambda gateway target exposing a Retrieve tool. See Knowledge bases through a gateway.
VPC Endpoint Sets: (Optional) Deploys the interface and gateway VPC endpoints of each set in the top-level vpcEndpoints map, each with its own security group, via @aws-mdaa/vpc-endpoint-l3-construct. Which endpoints exist is derived from the harnesses and knowledge base connectors referencing the set; the set states only which VPC it serves and how each endpoint is reached. See VPC endpoint sets for the config surface and what is rejected at synth.
If you already have an OpenSearch Serverless VPC endpoint in your VPC, you can configure the vector store to use it instead of creating a new one. This is useful when:
To use an existing VPC endpoint, add the ossVpce property with vpceId and securityGroupId to your OpenSearch Serverless vector store configuration:
vectorStores:
my-vector-store:
vectorStoreType: OPENSEARCH_SERVERLESS
vpcId: 'vpc-1234567890abcdef0'
subnetIds:
- 'subnet-1234567890abcdef0'
- 'subnet-0987654321fedcba0'
standbyReplicas: ENABLED
# Provide existing VPC endpoint details to reuse instead of creating new
ossVpce:
vpceId: 'vpce-1234567890abcdef0'
securityGroupId: 'sg-1234567890abcdef0'
Important Notes:
ossVpce configuration is only applicable to OpenSearch Serverless vector stores (not Aurora Serverless)vpceId and securityGroupId must be provided together within ossVpceTo get started, see the sample configurations.