Lambda SnapStart
AWS Lambda SnapStart reduces cold start times for Lambda functions by pre-initializing execution environments.Enable Lambda SnapStart for faster cold start performance. Improves response times and user experience.
Lambda SnapStart Considerations
When to disable:- Deploying to a region without SnapStart support
- Cost optimization for low-traffic deployments
- Troubleshooting initialization issues
RAG Replicas Configuration
Control replica settings for Knowledge Bases using Amazon OpenSearch Serverless.Enable additional replicas for the RAG database (Knowledge Bases). Enhances availability for production but increases costs.
Replica Configuration Details
With replicas enabled (production):- Minimum capacity: 2 OCUs (OpenSearch Compute Units)
- Availability: High availability with automatic failover
- Cost: Higher operational costs
- Use case: Production workloads requiring uptime
- Minimum capacity: 1 OCU
- Availability: Standard availability
- Cost: Lower operational costs
- Use case: Development, testing, proof-of-concept
As of June 2024, OpenSearch Serverless supports 0.5 OCU minimum, further reducing entry costs. Production deployments start with 2 OCUs, while dev/test workloads use 1 OCU. OpenSearch Serverless automatically scales based on demand.
Bot Store Replicas
Enable standby replicas for the OpenSearch Serverless collection used by bot store. Improves availability but increases costs.
Multi-Tenant Knowledge Base
Bedrock Chat supports multi-tenant mode to work around the 100 Knowledge Base limit per AWS account.How Multi-Tenant Mode Works
- Shared Knowledge Base: Multiple bots share a single Knowledge Base with common settings
- Metadata filtering: Files uploaded by each bot are filtered using Bot ID metadata
- Default behavior: Newly created bots have multi-tenant mode enabled by default
- Migration: Existing bots can be migrated to multi-tenant mode
Migrate Bots to Multi-Tenant Mode
Single bot migration:New bots use multi-tenant mode by default. To use dedicated Knowledge Bases, change the bot’s knowledge settings to “Create a dedicated Knowledge Base.”
Development Access
Configure IAM role for development and debugging access.ARN of an IAM role granted access to development resources. Used for debugging and development workflows.
Environment-Based Configuration
Define environment-specific advanced settings usingparameter.ts.
Example - Development environment (cost-optimized):
Environment Identification
All resources in multi-environment deployments are tagged for identification. Tags applied:CDKEnvironment: devCDKEnvironment: prodCDKEnvironment: default
- Main stacks:
dev-BedrockChatStack,prod-BedrockChatStack - Bot stacks:
BrChatKbStack*(no environment prefix) - API stacks:
ApiPublishmentStack*(no environment prefix)
- Some resources:
dev_ddb_export,dev-FrontendWebAcl - Most resources: Original names within environment-specific stacks
Use the
CDKEnvironment tag to identify which environment a resource belongs to.CDK Context Overrides
Override advanced settings during deployment without modifying configuration files:cdk.json settings.
Regional Deployment Considerations
Supported Regions for Full Features
Deploy Bedrock Chat in regions where OpenSearch Serverless and Ingestion APIs are available for full bot and knowledge base functionality. Supported regions (as of August 2025):- us-east-1, us-east-2, us-west-1, us-west-2
- ap-south-1, ap-northeast-1, ap-northeast-2, ap-southeast-1, ap-southeast-2
- ca-central-1
- eu-central-1, eu-west-1, eu-west-2, eu-south-2, eu-north-1
- sa-east-1
Bedrock Region Configuration
ThebedrockRegion parameter specifies where Bedrock API calls are made:
Resource Removal
Properly remove Bedrock Chat resources: Using CDK:- Access CloudFormation console
- Delete
BedrockChatStack - Delete
FrontendWafStack(in us-east-1 region) - Delete environment-specific stacks (e.g.,
dev-BedrockChatStack)
Performance Optimization Summary
| Setting | Development | Production |
|---|---|---|
enableLambdaSnapStart | false (cost) | true (performance) |
enableRagReplicas | false (cost) | true (availability) |
enableBotStoreReplicas | false (cost) | true (availability) |
enableBedrockGlobalInference | true | true |
enableBedrockCrossRegionInference | true | true |
Troubleshooting Advanced Settings
Lambda SnapStart Issues
Problem: Deployment fails with SnapStart error Solution: Disable SnapStart if deploying to an unsupported region:OpenSearch Replica Issues
Problem: Cannot changeenableBotStoreReplicas after deployment
Solution: This is by design. Destroy and recreate the stack with the desired setting.