feat: add VPC network mode support for agent runtimes#423
Closed
feat: add VPC network mode support for agent runtimes#423
Conversation
Add support for deploying AgentCore Runtimes in VPC network mode, enabling agents to run within customer VPCs with specified subnets and security groups. Changes: - Fix NetworkModeSchema enum: PRIVATE → VPC to match AWS API - Add NetworkConfigSchema with subnet/security group validation - Add networkConfig field to AgentEnvSpec with cross-field validation - Add --network-mode, --subnets, --security-groups CLI flags to create and add commands - Extract shared VPC validation and parsing utilities - Add VPC info messages to dev and invoke commands - Update LLM-compacted schema documentation - Add comprehensive unit tests for VPC validation
Contributor
Coverage Report
|
Contributor
Author
|
Splitting into 3 stacked PRs for easier review. |
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.
Summary
PUBLIC | PRIVATEtoPUBLIC | VPCto match the AWS APINetworkConfigSchemawith subnet/security group ID validation, cross-field validation (VPC mode requires networkConfig, PUBLIC mode rejects it)--network-mode,--subnets,--security-groupsfor bothcreateandadd agentcommands with shared validation utilitiesdevcommand and VPC Endpoint guidance ininvokecommand when agents use VPC modeFiles changed (23)
constants.ts,agent-env.ts,llm-compacted/*.tscommand.tsx,action.ts,validate.ts,types.tscommand.tsx,actions.ts,validate.ts,types.tscommand.tsxaction.tsshared/vpc-utils.ts(new)schema-mapper.ts,generate/types.tsCompanion PR
CDK construct changes: https://github.com/aws/agentcore-l3-cdk-constructs/pull/54
Test plan
npm test)tsc --noEmit)agentcore create --name test --defaults --network-mode VPC --subnets subnet-xxx --security-groups sg-xxx --dry-run