A SysOps Administrator launches an Amazon EC2 instance in a newly created subnet within a VPC. The instance is assigned a public IPv4 address, and the associated security group is configured to allow inbound SSH traffic on port 22 from the administrator's public IP address. The default network ACL (NACL) is associated with the subnet. However, the administrator is unable to establish an SSH connection to the instance, resulting in a connection timeout. Which of the following is the most likely cause of this routing and connectivity issue?
- The route table associated with the subnet does not contain a route pointing to the Internet Gateway.Cevap
- BThe outbound rules of the associated network ACL do not allow traffic to ephemeral ports 1024-65535.
- CThe subnet's route table has not been associated with the S3 gateway endpoint.
- DThe instance is encrypted with a custom AWS KMS key, and the KMS key policy does not allow the instance's IAM role to decrypt the volume.
Cevap
The route table associated with the subnet does not contain a route pointing to the Internet Gateway.
For an EC2 instance to receive traffic from the internet, it must be in a public subnet. A public subnet is defined by having a route table containing a default route pointing to an Internet Gateway. In this scenario, although the instance has a public IP address and the security group allows inbound SSH traffic, the lack of a route targeting the Internet Gateway prevents internet-bound traffic from being routed correctly, resulting in a connection timeout.
Adım Adım Çözüm
Anahtar Kavram
Subnets require a route targeting an Internet Gateway in their associated route tables to allow internet communication.