Hints — VPC Settings - Lab 05
Open each hint only after you’ve spent time investigating on your own.
Hint 1 — Look at the Outputs
Open the Outputs tab for your CloudFormation stack. Look at the WebPageURL value.
A normal URL looks like:
http://ec2-1-2-3-4.compute-1.amazonaws.com/
What does your WebPageURL show instead? What part of the URL is missing?
Hint 2 — The instance itself
The InstancePublicIP Output contains the instance’s public IP address.
Try opening that address directly in your browser: http://<InstancePublicIP>/
Does the page load? If yes, the web server is running correctly. The issue is not with the
instance or the web server — something is preventing the instance from being assigned the
type of address that should appear in WebPageURL.
Hint 3 — VPC-level settings
EC2 instances receive different types of addresses depending on how the VPC is configured. A public IP address is assigned when the subnet has auto-assign enabled. Another type of address — the one missing from the URL — is controlled separately at the VPC level.
Navigate to the VPC console > Your VPCs. Select
brokenlabs-vpc-lab-05-vpc and look at the Details tab.
Find the settings that relate to how instances in this VPC are addressed. Is everything enabled?
Spoiler Alert — Full Solution
Root cause: The VPC has DNS hostnames disabled. When this setting is off, EC2
instances in the VPC are not assigned public DNS hostnames — only a public IP address.
The WebPageURL Output used the DNS hostname, which was empty at stack creation time,
producing the broken http:/// URL.
To fix:
- Open the VPC console and go to Your VPCs
- Select the VPC named
brokenlabs-vpc-lab-05-vpc - Click Actions > Edit VPC settings
- Check the box for Enable DNS hostnames
- Click Save
- Navigate to the EC2 console > Instances
- Select
brokenlabs-vpc-lab-05and find the Public IPv4 DNS field - Open
http://<public-ipv4-dns>/in your browser — the AWS Broken Labs page should appear
Note: The
WebPageURLin CloudFormation Outputs was captured at stack creation and will still showhttp:///. Use the DNS name from the EC2 console directly.