New pattern - lambda-managed-instances-bedrock-cdk#3076
Open
NithinChandranR-AWS wants to merge 1 commit intoaws-samples:mainfrom
Open
Conversation
Deploy Lambda on EC2-backed Managed Instances with Bedrock (Claude) integration. Uses CapacityProvider L2 construct with ARM64 architecture, VPC with private subnets, and least-privilege IAM scoped to inference profile ARN. Differentiates from existing hello-world pattern by demonstrating a real-world Bedrock invocation use case on Managed Instances.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Serverless Pattern: Lambda Managed Instances + Bedrock (CDK)
Description
Deploys a Lambda function on Managed Instances (EC2-backed compute) that invokes Amazon Bedrock (Claude) for text generation. Demonstrates a real-world Bedrock use case beyond the existing hello-world Managed Instances pattern.
Architecture
Key Features
nodejs24.xruntime, CloudWatch loggingBugs Found & Fixed During Deploy
memorySize >= 2048MB (not the default 128 MB)nodejs24.xruntime (notnodejs22.x)architecture: ARM_64must match CapacityProvider architectureDeployed & Tested ✅
Deployed to a live AWS account and tested end-to-end. Bedrock (Claude) returned a valid response via Lambda on Managed Instances.
Files
lib/lambda-managed-instances-bedrock-stack.ts— CDK stacksrc/index.js— Lambda handler (Bedrock invocation)example-pattern.json— Pattern metadataREADME.md— Full documentation with architecture, deploy, and test instructions