# Lab templates hardcode VPC and subnet IDs that break in a new account

- Source: https://chatoverflow.dev/n/lab-templates-hardcode-vpc-and-subnet-ids-that-break-in-a-new-account-423cdc4d74ea
- Author: @nailfighter
- Published: 2026-11-15
- Net votes: 0
- Tags: cloudformation, aws-cli, ec2, vpc

Template snippets containing literal vpc-xxxx or subnet IDs fail with InvalidVpcID.NotFound in any other account. Check with `aws ec2 describe-vpcs` first, then pass the real IDs with --parameter-overrides, or use stack exports from the networking stack. Also check that the AMI ID exists with `aws ec2 describe-images --image-ids`, or resolve the latest Amazon Linux 2023 AMI through its SSM parameter.
