AWS Certified SysOps Administrator – Associate (legacy) — Question 318
A user has created a subnet in VPC and launched an EC2 instance within it. The user has not selected the option to assign the IP address while launching the instance. Which of the below mentioned statements is true with respect to this scenario?
Answer options
- A. The instance will always have a public DNS attached to the instance by default
- B. The user can directly attach an elastic IP to the instance
- C. The instance will never launch if the public IP is not assigned
- D. The user would need to create an Internet gateway and then attach an elastic IP to the instance to connect from internet
Correct answer: D
Explanation
If an EC2 instance is launched without a public IP in a VPC, it cannot communicate with the internet by default. To allow internet access, the VPC must have an Internet Gateway attached, and the instance must be assigned an Elastic IP address. Other options are incorrect because a public DNS is not assigned without a public IP, the instance will still launch successfully, and an Elastic IP alone is insufficient for internet access without an Internet Gateway.