AWS Builder Center

A Smaller Bedrock Gateway, Part 2: The Network Boundary: Isolated VPC, Logging, and DNS Firewall

The first half of the network stack in readable YAML: an isolated VPC, VPC Flow Logs, DNS Firewall, and a retained log bucket.

Series: A Smaller Bedrock Gateway (8 articles)

  1. 2
    A Smaller Bedrock Gateway, Part 2: The Network Boundary: Isolated VPC, Logging, and DNS Firewall This article
Sr. Solutions Architect, AWS
Last updated: 2026-11-13 (Fri) 18:22 GST
In Part 1, I explained when a private gateway in front of Amazon Bedrock is worth running. In this part, I will start building the first of the two CloudFormation stacks: the network that everything else runs in. This part covers the controls that make the VPC isolated and observable: the VPC itself, its route tables, VPC Flow Logs, Route 53 Resolver DNS Firewall, the private hosted zone, and the bucket that holds load balancer access logs. Part 3 completes the stack with the security groups and the VPC endpoints, and then deploys it.
The network template is published in nine blocks across this part and the next. Save each block under the file name it gives, in the same folder. At the end of Part 3, one command joins them and checks that the result is exactly the template that was validated.

Inputs and guard rails

The template takes a VPC range, the name of the private hosted zone, the name you will give the gateway stack, the client and administrator ranges, the model identifiers, and log retention periods. Two rules run before CloudFormation creates anything. The first refuses any Region other than  eu-central-1  and any model other than the reviewed Claude Sonnet 4.6 profile, because the endpoint policy in Part 3 is written for exactly those values. The second refuses a client range that equals the administrator range, because the load balancer uses the difference to decide who may reach the key-management paths.

Parameters and rules

This block holds the template header, the parameters, and the two rules. Save this block as  network-01.yaml .
AWSTemplateFormatVersion: '2010-09-09'

Description: >-
Stack 1 of 2 for a private LiteLLM gateway on ECS Fargate calling Bedrock. It
owns a VPC, two private subnets and route tables, retained VPC Flow Logs and ALB
audit logs, Route 53 Resolver DNS Firewall, private hosted zone, the complete security-group graph, five interface endpoints, and one S3
gateway endpoint. It creates no internet, NAT, or transit gateway, VPN, Resolver
inbound endpoint, hybrid DNS inbound path, or IPv4/IPv6 default route. Approved
private ingress and hybrid DNS are external prerequisites.

For a fresh VPC, FirewallFailOpen defaults to DISABLED. The validator must verify
this service-owned, non-CloudFormation setting through GetFirewallConfig.

Deploy only in eu-central-1. The Bedrock runtime endpoint permits the exact
eu.anthropic.claude-sonnet-4-6 inference profile and six destination Regions listed
below. Its endpoint policy provides defense in depth; it does not independently
prove inference routing or processing location. This stack makes no
EU-member-state-only processing claim.

Parameters:

VpcCidr:
Type: String
Default: 10.20.0.0/16
AllowedPattern: '^(10\.([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.0\.0|172\.(1[6-9]|2[0-9]|3[01])\.0\.0|192\.168\.0\.0)/16$'
ConstraintDescription: Must be an RFC 1918 /16 network aligned on a /16 boundary.
Description: >-
Dedicated VPC CIDR. The template deterministically derives two /24 private
subnets from this /16.

PrivateHostedZoneName:
Type: String
Default: internal.example
MinLength: 3
MaxLength: 253
AllowedPattern: '^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$'
ConstraintDescription: >-
Must be a lowercase DNS name without a wildcard or trailing dot.
Description: >-
Private hosted-zone name. The safe documentation default uses the reserved
internal.example namespace.

GatewayStackName:
Type: String
MinLength: 1
MaxLength: 128
AllowedPattern: '^[a-zA-Z][-a-zA-Z0-9]*$'
ConstraintDescription: Must be a valid CloudFormation stack name.
Description: >-
Exact name of the paired stack 2. It is retained only to scope that gateway's
ALB access-log delivery bucket prefix. For a blue/green replacement, deploy
new paired network and gateway stack names rather than reusing this prefix.

ClientIngressCidr:
Type: String
AllowedPattern: '^(?:10\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/(?:[89]|[12][0-9]|3[0-2])|172\.(?:1[6-9]|2[0-9]|3[01])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/(?:1[2-9]|2[0-9]|3[0-2])|192\.168\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/(?:1[6-9]|2[0-9]|3[0-2]))$'
ConstraintDescription: Must be an RFC 1918 IPv4 CIDR.
Description: >-
Private client source CIDR admitted to the internal ALB on TCP/443.

AdminIngressCidr:
Type: String
AllowedPattern: '^(?:10\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/(?:[89]|[12][0-9]|3[0-2])|172\.(?:1[6-9]|2[0-9]|3[01])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/(?:1[2-9]|2[0-9]|3[0-2])|192\.168\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\/(?:1[6-9]|2[0-9]|3[0-2]))$'
ConstraintDescription: Must be an RFC 1918 IPv4 CIDR.
Description: >-
Separate private administrator source CIDR admitted to the internal ALB on
TCP/443. It must differ from ClientIngressCidr. For the validation harness,
it must contain the dedicated VPC CIDR so probe tasks can call administrator
routes.

S3PrefixListId:
Type: String
AllowedPattern: '^pl-[0-9a-f]{8,17}$'
ConstraintDescription: Must be an Amazon EC2 managed prefix list ID such as pl- followed by 8 to 17 lowercase hexadecimal characters.
Description: >-
Managed prefix list ID for Amazon S3 in this Region. It scopes task security-
group egress and is exported for the test probe.

ModelId:
Type: String
Default: eu.anthropic.claude-sonnet-4-6
AllowedValues:
- eu.anthropic.claude-sonnet-4-6
ConstraintDescription: Must be eu.anthropic.claude-sonnet-4-6.
Description: >-
Exact Bedrock Europe-geography cross-Region inference profile authorized by
the endpoint policy.

FoundationModelId:
Type: String
Default: anthropic.claude-sonnet-4-6
AllowedValues:
- anthropic.claude-sonnet-4-6
ConstraintDescription: Must be anthropic.claude-sonnet-4-6.
Description: >-
Exact foundation model authorized only when Bedrock invokes it through
ModelId.

FlowLogRetentionDays:
Type: Number
Default: 365
AllowedValues:
- 1
- 3
- 5
- 7
- 14
- 30
- 60
- 90
- 120
- 150
- 180
- 365
- 400
- 545
- 731
- 1096
- 1827
- 2192
- 2557
- 2922
- 3288
- 3653
Description: Finite retention period for the KMS-encrypted VPC Flow Logs log group.

AlbAccessLogRetentionDays:
Type: Number
Default: 365
MinValue: 30
MaxValue: 3650
Description: >-
Number of days before current and noncurrent ALB access-log objects expire.

Rules:

ReviewedSourceRegionAndModelContract:
Assertions:
- Assert:
Fn::Equals:
- !Ref AWS::Region
- eu-central-1
AssertDescription: This stack must be deployed in eu-central-1.
- Assert:
Fn::Equals:
- !Ref ModelId
- eu.anthropic.claude-sonnet-4-6
AssertDescription: ModelId must be eu.anthropic.claude-sonnet-4-6.
- Assert:
Fn::Equals:
- !Ref FoundationModelId
- anthropic.claude-sonnet-4-6
AssertDescription: FoundationModelId must be anthropic.claude-sonnet-4-6.

DistinctIngressCidrs:
Assertions:
- Assert:
Fn::Not:
- Fn::Equals:
- !Ref ClientIngressCidr
- !Ref AdminIngressCidr
AssertDescription: ClientIngressCidr and AdminIngressCidr must differ.

A VPC with no way out

The VPC has two private subnets in different Availability Zones and one route table per subnet. Look at what is missing: there is no internet gateway, no NAT gateway, and no default route of any kind. Each route table starts with only the local route. The S3 gateway endpoint in Part 3 adds the one other route the tasks need, to the Regional S3 prefix list, so that Fargate can pull image layers.

VPC, subnets, and route tables

This block starts the resources section. Save this block as  network-02.yaml .
Resources:

# ---------------------------------------------------------------------------
# Dedicated network: exactly two private subnets and no internet routes
# ---------------------------------------------------------------------------

Vpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: !Ref VpcCidr
EnableDnsHostnames: true
EnableDnsSupport: true
InstanceTenancy: default
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-vpc'

PrivateSubnetA:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref Vpc
AvailabilityZone:
Fn::Select:
- 0
- Fn::GetAZs: ''
CidrBlock:
Fn::Select:
- 0
- Fn::Cidr:
- !Ref VpcCidr
- 2
- 8
AssignIpv6AddressOnCreation: false
MapPublicIpOnLaunch: false
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-private-a'

PrivateSubnetB:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref Vpc
AvailabilityZone:
Fn::Select:
- 1
- Fn::GetAZs: ''
CidrBlock:
Fn::Select:
- 1
- Fn::Cidr:
- !Ref VpcCidr
- 2
- 8
AssignIpv6AddressOnCreation: false
MapPublicIpOnLaunch: false
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-private-b'

PrivateRouteTableA:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref Vpc
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-private-a'

PrivateRouteTableB:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref Vpc
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-private-b'

PrivateSubnetRouteTableAssociationA:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId: !Ref PrivateRouteTableA
SubnetId: !Ref PrivateSubnetA

PrivateSubnetRouteTableAssociationB:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId: !Ref PrivateRouteTableB
SubnetId: !Ref PrivateSubnetB

# ---------------------------------------------------------------------------
# VPC Flow Logs: dedicated retained log group and key, finite log retention
# ---------------------------------------------------------------------------

Flow logs you can trust

VPC Flow Logs record every accepted and rejected connection at the one-minute aggregation interval, so you can show after the fact that nothing left the VPC. The log group is encrypted with its own customer managed KMS key with rotation turned on, and the delivery role can write only to that group.

VPC Flow Logs

This block holds the KMS key, the log group, the delivery role, and the flow log. Save this block as  network-03.yaml .
FlowLogKmsKey:
Type: AWS::KMS::Key
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
Description: !Sub '${AWS::StackName} VPC Flow Logs encryption key'
EnableKeyRotation: true
KeySpec: SYMMETRIC_DEFAULT
KeyUsage: ENCRYPT_DECRYPT
MultiRegion: false
PendingWindowInDays: 30
KeyPolicy:
Version: '2012-10-17'
Statement:
- Sid: AccountAdministration
Effect: Allow
Principal:
AWS: !Sub 'arn:${AWS::Partition}:iam::${AWS::AccountId}:root'
Action: 'kms:*'
Resource: '*'
- Sid: AllowCloudWatchLogsForSameAccountLogGroups
Effect: Allow
Principal:
Service: !Sub 'logs.${AWS::Region}.${AWS::URLSuffix}'
Action:
- 'kms:Encrypt*'
- 'kms:Decrypt*'
- 'kms:ReEncrypt*'
- 'kms:GenerateDataKey*'
- 'kms:Describe*'
Resource: '*'
Condition:
ArnLike:
'kms:EncryptionContext:aws:logs:arn': !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:*'

FlowLogKmsKeyAlias:
Type: AWS::KMS::Alias
Properties:
AliasName: !Sub 'alias/${AWS::StackName}-vpc-flow-logs'
TargetKeyId: !Ref FlowLogKmsKey

VpcFlowLogGroup:
Type: AWS::Logs::LogGroup
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
KmsKeyId: !GetAtt FlowLogKmsKey.Arn
RetentionInDays: !Ref FlowLogRetentionDays
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-vpc-flow-logs'

FlowLogDeliveryRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: AllowVpcFlowLogsService
Effect: Allow
Principal:
Service: vpc-flow-logs.amazonaws.com
Action: 'sts:AssumeRole'
Condition:
StringEquals:
'aws:SourceAccount': !Ref AWS::AccountId
ArnLike:
'aws:SourceArn': !Sub 'arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc-flow-log/*'
Policies:
- PolicyName: !Sub '${AWS::StackName}-publish-vpc-flow-logs'
PolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: CreateStreamsAndPublish
Effect: Allow
Action:
- 'logs:CreateLogStream'
- 'logs:PutLogEvents'
Resource: !GetAtt VpcFlowLogGroup.Arn
- Sid: DescribeOnlyThisLogGroup
Effect: Allow
Action: 'logs:DescribeLogStreams'
Resource: !GetAtt VpcFlowLogGroup.Arn
- Sid: DiscoverLogGroup
Effect: Allow
Action: 'logs:DescribeLogGroups'
Resource: '*'
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-vpc-flow-logs-delivery'

VpcFlowLog:
Type: AWS::EC2::FlowLog
Properties:
DeliverLogsPermissionArn: !GetAtt FlowLogDeliveryRole.Arn
LogDestinationType: cloud-watch-logs
LogGroupName: !Ref VpcFlowLogGroup
MaxAggregationInterval: 60
ResourceId: !Ref Vpc
ResourceType: VPC
TrafficType: ALL
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-vpc-flow-log'

# ---------------------------------------------------------------------------
# Route 53 Resolver DNS Firewall: explicit service allow rules, then block all
# ---------------------------------------------------------------------------

DNS Firewall: allow the names you need, block the rest

Routes and security groups stop packets. DNS Firewall stops a task from even resolving a name it has no business with, which closes off DNS as a data channel. The rule group has two rules. The first, at priority 100, allows the exact AWS service names the gateway needs and the private zone. The second, at priority 200, matches every other name and answers NXDOMAIN.
The allow rule trusts redirections because Amazon S3 answers the ECR layer bucket name with a CNAME to a Regional S3 name. Only names already on the allow list get that treatment; the catch-all rule still inspects every redirection. Mutation protection is left disabled on purpose, so that CloudFormation can still update and delete the association. Fail-open is a VPC setting outside the template, and Part 3 shows you how to confirm it is off.

DNS Firewall

This block holds the two domain lists, the rule group, and its association with the VPC. Save this block as  network-04.yaml .
GatewayAllowedDnsDomains:
Type: AWS::Route53Resolver::FirewallDomainList
Properties:
Domains:
- !Sub 'bedrock-runtime.${AWS::Region}.${AWS::URLSuffix}'
- !Sub 'api.ecr.${AWS::Region}.${AWS::URLSuffix}'
- !Sub 'dkr.ecr.${AWS::Region}.${AWS::URLSuffix}'
- !Sub '*.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}'
- !Sub 'secretsmanager.${AWS::Region}.${AWS::URLSuffix}'
- !Sub 'logs.${AWS::Region}.${AWS::URLSuffix}'
- !Sub 's3.${AWS::Region}.${AWS::URLSuffix}'
- !Sub '*.s3.${AWS::Region}.${AWS::URLSuffix}'
- !Sub 's3-${AWS::Region}.${AWS::URLSuffix}'
- !Sub '*.s3-${AWS::Region}.${AWS::URLSuffix}'
- !Sub 'rds.${AWS::Region}.${AWS::URLSuffix}'
- !Sub '*.${AWS::Region}.rds.${AWS::URLSuffix}'
# DNS policy permits cache-name resolution only. CacheSecurityGroup remains
# the exact network boundary for Valkey reachability.
- '*.cache.amazonaws.com'
- !Sub '*.${AWS::Region}.elb.${AWS::URLSuffix}'
- !Sub '*.${AWS::Region}.vpce.${AWS::URLSuffix}'
- !Ref PrivateHostedZoneName
- !Sub '*.${PrivateHostedZoneName}'
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-gateway-allowed-domains'

AllDnsDomains:
Type: AWS::Route53Resolver::FirewallDomainList
Properties:
# AWS documents a single asterisk as the supported all-domain match for a
# DNS Firewall walled garden. The lower-priority rule below is the catch-all.
Domains:
- '*'
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-all-domains'

GatewayDnsFirewallRuleGroup:
Type: AWS::Route53Resolver::FirewallRuleGroup
Properties:
FirewallRules:
# Allowed AWS names can CNAME to service-owned targets (the ECR layer
# bucket resolves via s3-r-w.<region>.amazonaws.com). Trust the chain only
# for allowlisted names; the security groups remain the network boundary.
- Action: ALLOW
FirewallDomainListId: !Ref GatewayAllowedDnsDomains
FirewallDomainRedirectionAction: TRUST_REDIRECTION_DOMAIN
Priority: 100
- Action: BLOCK
BlockResponse: NXDOMAIN
FirewallDomainListId: !Ref AllDnsDomains
FirewallDomainRedirectionAction: INSPECT_REDIRECTION_DOMAIN
Priority: 200
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-dns-egress'

# FirewallFailOpen is not a CloudFormation-managed setting in this stack.
# DISABLED is the Route 53 Resolver service default for a fresh VPC, and the
# validator must verify that service-owned state through GetFirewallConfig.
GatewayDnsFirewallAssociation:
Type: AWS::Route53Resolver::FirewallRuleGroupAssociation
Properties:
FirewallRuleGroupId: !Ref GatewayDnsFirewallRuleGroup
# Keep lifecycle control with CloudFormation. ENABLED prevents CloudFormation
# from replacing or deleting the association and would strand the VPC on stack
# updates or deletion unless an operator first changed it out of band.
MutationProtection: DISABLED
Priority: 101
VpcId: !Ref Vpc
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-dns-egress'

# ---------------------------------------------------------------------------
# Private service name and retained ALB access-log storage
# ---------------------------------------------------------------------------

The private name and the log bucket

The private hosted zone gives clients a stable name for the gateway, and the gateway stack adds its record. The access-log bucket for the load balancer blocks public access, enforces bucket-owner object ownership, turns on versioning and encryption, and expires objects after the retention period you set. Its policy allows only the load balancer log delivery service to write under this gateway's prefix and denies any request that does not use TLS. Both the bucket and its policy are retained when you delete the stack, so you keep the audit trail.

Private hosted zone and load balancer log bucket

This block holds the hosted zone, the bucket, and the bucket policy. Save this block as  network-05.yaml .
PrivateHostedZone:
Type: AWS::Route53::HostedZone
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
Name: !Ref PrivateHostedZoneName
HostedZoneConfig:
Comment: !Sub 'Private DNS namespace owned by ${AWS::StackName}'
HostedZoneTags:
- Key: Name
Value: !Sub '${AWS::StackName}-private-zone'
VPCs:
- VPCId: !Ref Vpc
VPCRegion: !Ref AWS::Region

AlbAccessLogBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Metadata:
checkov:
skip:
- id: CKV_AWS_18
comment: >-
This bucket is itself the dedicated ALB access-log destination. Enabling
S3 server access logging to itself would create recursive logs.
- id: CKV_AWS_145
comment: >-
Application Load Balancer access-log delivery supports SSE-S3, not SSE-KMS.
Properties:
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: AES256
LifecycleConfiguration:
Rules:
- Id: ExpireAlbAccessLogs
Status: Enabled
ExpirationInDays: !Ref AlbAccessLogRetentionDays
NoncurrentVersionExpiration:
NoncurrentDays: !Ref AlbAccessLogRetentionDays
AbortIncompleteMultipartUpload:
DaysAfterInitiation: 7
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true
VersioningConfiguration:
Status: Enabled
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-alb-access-logs'

AlbAccessLogBucketPolicy:
Type: AWS::S3::BucketPolicy
# The bucket is retained for audit evidence. Retain its TLS-only access policy
# with it so deleting the stack does not weaken transport controls on old logs.
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
Bucket: !Ref AlbAccessLogBucket
PolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: AllowAlbLogDelivery
Effect: Allow
Principal:
Service: logdelivery.elasticloadbalancing.amazonaws.com
Action: 's3:PutObject'
# GatewayStackName is used only for this paired gateway's immutable
# delivery prefix. Blue/green replacements use new paired stack names.
Resource: !Sub '${AlbAccessLogBucket.Arn}/${GatewayStackName}/alb/AWSLogs/${AWS::AccountId}/*'
Condition:
StringEquals:
'aws:SourceAccount': !Ref AWS::AccountId
ArnLike:
'aws:SourceArn': !Sub 'arn:${AWS::Partition}:elasticloadbalancing:${AWS::Region}:${AWS::AccountId}:loadbalancer/app/*'
- Sid: DenyInsecureTransport
Effect: Deny
Principal: '*'
Action: 's3:*'
Resource:
- !GetAtt AlbAccessLogBucket.Arn
- !Sub '${AlbAccessLogBucket.Arn}/*'
Condition:
Bool:
'aws:SecureTransport': 'false'

# ---------------------------------------------------------------------------
# Complete production security-group graph. Stack 2 only attaches these groups.
# ---------------------------------------------------------------------------

A quick recap of activities

In this part, we saved the first half of the network template:
  • Parameters and rules that pin the Region, the model, and two distinct ingress ranges.
  • A VPC with two private subnets and route tables that have no route to the internet.
  • Flow logs for every connection, encrypted with a dedicated KMS key.
  • A DNS Firewall rule group that allows only the required names and blocks everything else.
  • A private hosted zone and a retained, TLS-only bucket for load balancer access logs.

Conclusion

The VPC now has no way out, records what happens inside it, and refuses to resolve names it does not need. In Part 3, I will add the security groups that decide who can talk to whom, and the endpoints that give the tasks private access to Bedrock and the other AWS services. Then we will deploy the stack and check the boundary in the console.
This is Part 2 of the eight-part A Smaller Bedrock Gateway series. Part 1 covers the design, Parts 2 and 3 the network stack, Part 4 the hardened image, Parts 5 to 7 the gateway stack, and Part 8 the deployment, validation, and day-two operations.

Series: A Smaller Bedrock Gateway (8 articles)

  1. 2
    A Smaller Bedrock Gateway, Part 2: The Network Boundary: Isolated VPC, Logging, and DNS Firewall This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article