SOA-C02 Question 272
Select 4A company is running a web application on an EC2 instance in a public subnet within a VPC. The instance is using an assigned Elastic IP address. The application is not accessible from the internet. Upon investigation, you verify that the instance is running and the application is listening on the correct port. Which of the following actions should you take to troubleshoot and resolve the connectivity issue?
- A
Check the security group attached to the instance to ensure it allows inbound traffic on the required port.
- B
Verify the network ACLs associated with the subnet to ensure they allow inbound and outbound traffic on the required port.
- C
Confirm that the route table associated with the subnet includes a route to an internet gateway.
- D
Check the IAM role attached to the instance to ensure it has the necessary permissions for internet access.
- E
Ensure the Elastic IP is correctly associated with the EC2 instance.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
When troubleshooting network connectivity issues for an EC2 instance in a public subnet, you must ensure that all components contributing to connectivity are correctly configured. This includes verifying the security group rules, network ACLs, route table, and the Elastic IP association. IAM roles are unrelated to network connectivity and are not a factor in resolving this issue.
- A. Correct.
The security group associated with the EC2 instance must explicitly allow inbound traffic on the port the application is listening on. If this rule is not in place, the application will not be accessible over the internet.
- B. Correct.
Network ACLs act as a firewall at the subnet level. If the ACLs block inbound or outbound traffic on the required port, the application will not be accessible. Verifying these rules is crucial.
- C. Correct.
For an EC2 instance to communicate with the internet via an Elastic IP, the route table associated with the subnet must include a route to an internet gateway. Without this route, the instance cannot send or receive traffic over the internet.
- D. Incorrect.
IAM roles are not related to network connectivity but rather to granting permissions for AWS services. Checking the IAM role is irrelevant in this scenario.
- E. Correct.
Elastic IPs must be correctly associated with an EC2 instance to ensure it has a static public IP address. If the Elastic IP is not properly assigned, the instance will not be reachable using that IP.