Skip to content

Commit ae3953f

Browse files
committed
fix: AgentCore VPC validation and remove agentCoreNetworkType parameter
- Fix validation logic to properly handle null values for agentCoreSubnetIds - Remove agentCoreNetworkType parameter (network mode is now auto-detected) - Update documentation to reflect the simplified VPC configuration - Add isAgentCoreNetworkPrivate computed property
1 parent 8823df9 commit ae3953f

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

docs/en/DEPLOY_OPTION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,12 @@ Network settings apply to both Generic Runtime and AgentBuilder Runtime.
773773

774774
When using VPC mode, configure the following parameters:
775775

776-
- `agentCoreNetworkType`: Set to `PRIVATE`
777776
- `agentCoreVpcId`: VPC ID to use
778777
- `agentCoreSubnetIds`: List of subnet IDs to use
779778

779+
> [!NOTE]
780+
> When both `agentCoreVpcId` and `agentCoreSubnetIds` are configured, AgentCore Runtime will be deployed in private network mode. If both are left unset (`null`), it will be deployed in public network mode.
781+
780782
> [!IMPORTANT]
781783
> **Availability Zone (AZ) Support**: AgentCore Runtime has limited supported AZs per region. Subnets must be placed within supported AZs. For details, please refer to the [AWS official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html#agentcore-supported-azs).
782784
>
@@ -790,7 +792,6 @@ const envs: Record<string, Partial<StackInput>> = {
790792
dev: {
791793
createGenericAgentCoreRuntime: true,
792794
agentBuilderEnabled: true,
793-
agentCoreNetworkType: 'PRIVATE',
794795
agentCoreVpcId: 'vpc-xxxxxxxxx',
795796
agentCoreSubnetIds: ['subnet-xxxxxxxxx', 'subnet-yyyyyyyyy'],
796797
},
@@ -805,7 +806,6 @@ const envs: Record<string, Partial<StackInput>> = {
805806
"context": {
806807
"createGenericAgentCoreRuntime": true,
807808
"agentBuilderEnabled": true,
808-
"agentCoreNetworkType": "PRIVATE",
809809
"agentCoreVpcId": "vpc-xxxxxxxxx",
810810
"agentCoreSubnetIds": ["subnet-xxxxxxxxx", "subnet-yyyyyyyyy"]
811811
}

docs/ja/DEPLOY_OPTION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,12 @@ AgentCore Runtime は以下のネットワークモードで動作できます
788788

789789
VPC モードを使用する場合は、以下のパラメータを設定してください:
790790

791-
- `agentCoreNetworkType`: `PRIVATE` に設定
792791
- `agentCoreVpcId`: 使用するVPCのID
793792
- `agentCoreSubnetIds`: 使用するサブネットのIDリスト
794793

794+
> [!NOTE]
795+
> `agentCoreVpcId``agentCoreSubnetIds`を両方設定すると、AgentCore Runtimeはプライベートネットワークモードでデプロイされます。両方とも未設定(`null`)の場合は、パブリックネットワークモードでデプロイされます。
796+
795797
> [!IMPORTANT]
796798
> **Availability Zone (AZ) サポート**: AgentCore RuntimeはリージョンごとにサポートされているAZが限定されています。サブネットは必ずサポートされているAZ内に配置してください。詳細は[AWS公式ドキュメント](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html#agentcore-supported-azs)をご確認ください。
797799
>
@@ -805,7 +807,6 @@ const envs: Record<string, Partial<StackInput>> = {
805807
dev: {
806808
createGenericAgentCoreRuntime: true,
807809
agentBuilderEnabled: true,
808-
agentCoreNetworkType: 'PRIVATE',
809810
agentCoreVpcId: 'vpc-xxxxxxxxx',
810811
agentCoreSubnetIds: ['subnet-xxxxxxxxx', 'subnet-yyyyyyyyy'],
811812
},
@@ -820,7 +821,6 @@ const envs: Record<string, Partial<StackInput>> = {
820821
"context": {
821822
"createGenericAgentCoreRuntime": true,
822823
"agentBuilderEnabled": true,
823-
"agentCoreNetworkType": "PRIVATE",
824824
"agentCoreVpcId": "vpc-xxxxxxxxx",
825825
"agentCoreSubnetIds": ["subnet-xxxxxxxxx", "subnet-yyyyyyyyy"]
826826
}

docs/ko/DEPLOY_OPTION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,10 +772,12 @@ AgentCore Runtime은 다음 네트워크 모드에서 작동할 수 있습니다
772772

773773
VPC 모드를 사용할 때는 다음 매개변수를 설정하세요:
774774

775-
- `agentCoreNetworkType`: `PRIVATE`로 설정
776775
- `agentCoreVpcId`: 사용할 VPC ID
777776
- `agentCoreSubnetIds`: 사용할 서브넷 ID 목록
778777

778+
> [!NOTE]
779+
> `agentCoreVpcId``agentCoreSubnetIds`를 모두 설정하면 AgentCore Runtime이 프라이빗 네트워크 모드로 배포됩니다. 둘 다 미설정(`null`)인 경우 퍼블릭 네트워크 모드로 배포됩니다.
780+
779781
> [!IMPORTANT]
780782
> **가용 영역(AZ) 지원**: AgentCore Runtime은 리전별로 지원되는 AZ가 제한되어 있습니다. 서브넷은 반드시 지원되는 AZ 내에 배치해야 합니다. 자세한 내용은 [AWS 공식 문서](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html#agentcore-supported-azs)를 확인하세요.
781783
>
@@ -789,7 +791,6 @@ const envs: Record<string, Partial<StackInput>> = {
789791
dev: {
790792
createGenericAgentCoreRuntime: true,
791793
agentBuilderEnabled: true,
792-
agentCoreNetworkType: 'PRIVATE',
793794
agentCoreVpcId: 'vpc-xxxxxxxxx',
794795
agentCoreSubnetIds: ['subnet-xxxxxxxxx', 'subnet-yyyyyyyyy'],
795796
},
@@ -804,7 +805,6 @@ const envs: Record<string, Partial<StackInput>> = {
804805
"context": {
805806
"createGenericAgentCoreRuntime": true,
806807
"agentBuilderEnabled": true,
807-
"agentCoreNetworkType": "PRIVATE",
808808
"agentCoreVpcId": "vpc-xxxxxxxxx",
809809
"agentCoreSubnetIds": ["subnet-xxxxxxxxx", "subnet-yyyyyyyyy"]
810810
}

packages/cdk/lib/stack-input.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,9 @@ export const stackInputSchema = baseStackInputSchema
223223
(data) => {
224224
// Validate AgentCore VPC configuration consistency
225225
const hasVpcId = !!data.agentCoreVpcId;
226-
const hasSubnetIds =
227-
data.agentCoreSubnetIds && data.agentCoreSubnetIds.length > 0;
226+
const hasSubnetIds = !!(
227+
data.agentCoreSubnetIds && data.agentCoreSubnetIds.length > 0
228+
);
228229

229230
// Both must be provided or both must be empty
230231
return hasVpcId === hasSubnetIds;

0 commit comments

Comments
 (0)