Bedrock AgentCore custom code interpreters should use a private network configuration
Flags Amazon Bedrock AgentCore custom code interpreters that use PUBLIC or SANDBOX network mode instead of a private VPC configuration. Only VPC mode keeps interpreter traffic inside your network.
- service
- BedrockAgentCore
- severity
- High
- scope
- evaluated in every region
How to fix it
Set at creation: fixing it means replacing the resource.
Run the custom code interpreter with its network mode set to VPC. The mode is fixed when the interpreter is created, so create a second one carrying a VPC network configuration, repoint the agents that open sessions on it, then delete the flagged one; deleting it is what clears this finding. Moving off SANDBOX is not purely a tightening: a SANDBOX interpreter cannot reach your private network at all, and in a VPC its security groups become that boundary.
In the console
Bedrock AgentCore → Built-in tools → Create Code Interpreter tool → Network settings (fixed at creation)
With the AWS CLI
aws bedrock-agentcore-control create-code-interpreter --name <code-interpreter-name> --network-configuration '{"networkMode":"VPC","vpcConfig":{"subnets":["<subnet-id>"],"securityGroups":["<security-group-id>"]}}' --region <region>With Terraform
resource "aws_bedrockagentcore_code_interpreter" "this" {
name = var.code_interpreter_name
network_configuration {
network_mode = "VPC"
vpc_config {
security_groups = var.security_group_ids
subnets = var.subnet_ids
}
}
}
See which of your accounts this check is failing on.
Book a demo