Skip to content

Verification

Prove that every associated VPC resolves api.platform.demo.local to 10.0.1.10 regardless of account or region.

Network Account Dev Account Sandbox Account Platform_Zone api.platform.demo.local → 10.0.1.10 ap-southeast-2 ap-southeast-6 ap-southeast-2 ap-southeast-6 ap-southeast-2 ap-southeast-6 1 Test EC2 network primary 2 Test EC2 network secondary 3 Test EC2 network-apse6 4 Test EC2 dev-apse2 5 Test EC2 dev-apse6 6 Test EC2 sandbox-apse2 7 Test EC2 sandbox-apse6 Expected from every Test EC2 (Tests 1–7) dig +short api.platform.demo.local 10.0.1.10

Use terraform output test_ec2_instance_id (or test_ec2_instance_id_primary / _secondary on network) from the source demo repo — Test_EC2
One minimal EC2 per stack (seven total) for in-VPC DNS checks via SSM Session Manager and `dig`.
instance IDs change per deployment.

Region stacksSSMVerification approach
ap-southeast-2 (Tests 1, 2, 4, 6)All three endpoints — Session Manager works without NATSSM + dig
ap-southeast-6 (Tests 3, 5, 7)Partial endpoints by defaultStep A always works; Step B when SSM is Online

Step A — list-hosted-zones-by-vpc (always works)

Section titled “Step A — list-hosted-zones-by-vpc (always works)”

Proves VPC_Association
AssociateVPCWithHostedZone — workload account links its VPC to an authorized private hosted zone so the VPC resolver can query shared records.
without shell access:

Terminal window
export AWS_PROFILE=r53demo-sandbox
aws route53 list-hosted-zones-by-vpc \
--vpc-id <vpc-id-from-terraform-output> \
--vpc-region ap-southeast-6

Expected: HostedZoneSummaries includes platform.demo.local with OwningAccount = network account.

Terminal window
aws ssm start-session --target <instance-id> --region ap-southeast-6

Inside the session:

Terminal window
dig +short api.platform.demo.local

Expected: 10.0.1.10

Propagation delay

After a new association, allow 1–2 minutes before expecting Step B dig to answer. Confirm Step A first.

If start-session returns TargetNotConnected:

Terminal window
aws ssm send-command \
--instance-ids <instance-id> \
--document-name AWS-RunShellScript \
--parameters 'commands=["dig +short api.platform.demo.local"]' \
--region ap-southeast-6
aws ssm list-command-invocations --command-id <command-id> --details

Or enable NAT — see Prerequisites.

Testing ap-southeast-6 without NAT ($0 path)

Section titled “Testing ap-southeast-6 without NAT ($0 path)”
What you proveHowTests
PHZ shared to apse6 VPCsStep A from workload account profile3, 5, 7
Live dig from apse2SSM + dig (all three SSM endpoints exist)1, 2, 4, 6

TestStackScenarioExpected dig api.platform.demo.local
1network (primary)PHZ owner10.0.1.10
2network (secondary)Same-account same-region10.0.1.10
3network-apse6Same-account cross-region10.0.1.10
4dev-apse2Cross-account same-region10.0.1.10
5dev-apse6Cross-account cross-region10.0.1.10
6sandbox-apse2Cross-account same-region10.0.1.10
7sandbox-apse6Cross-account cross-region10.0.1.10
Terminal window
export AWS_PROFILE=r53demo-network
aws ssm start-session --target <primary-instance-id> --region ap-southeast-2
Terminal window
dig +short api.platform.demo.local
# Expected: 10.0.1.10

Same profile and region; use test_ec2_instance_id_secondary from network output.

Run Step A first, then Step B when SSM is available. Use --region ap-southeast-6.

Terminal window
export AWS_PROFILE=r53demo-dev # or r53demo-sandbox
aws ssm start-session --target <instance-id> --region ap-southeast-2
dig +short api.platform.demo.local

From any connected Test_EC2:

Terminal window
dig +short db.platform.demo.local
# Expected: 10.0.1.20
Terminal window
sudo dnf install -y bind-utils

All seven tests should return 10.0.1.10 for api.platform.demo.local. Resolution consistency across same/cross-account and same/cross-region proves the classic association pattern works.

Troubleshooting if any test fails.