A SysOps Administrator is troubleshooting connectivity issues for an Amazon EC2 instance deployed in Subnet-A of a VPC. The instance is assigned a public IPv4 address but is unable to access the internet to download package updates. Additionally, a Gateway VPC endpoint for Amazon S3 has been provisioned in the VPC, but the instance is unable to access Amazon S3 buckets privately. Which combination of actions will resolve these issues? (Select TWO.)
- Add a route in the route table associated with Subnet-A that maps to the Internet Gateway (IGW) attached to the VPC.Answer
- Update the route table associated with Subnet-A to include a route targeting the S3 Gateway VPC endpoint for the S3 prefix list.Answer
- CConfigure a NAT Gateway in Subnet-A and route all S3-bound traffic through the NAT Gateway to access the S3 API endpoint.
- DModify the subnet's Network ACL to allow outbound traffic to S3 on port 443, while blocking inbound traffic from ephemeral ports to .
- EAdd a route targeting the virtual private gateway (VGW) for the S3 prefix list in the route table associated with Subnet-A.
Answer
Add a route in the route table associated with Subnet-A that maps to the Internet Gateway (IGW) attached to the VPC, and update the route table associated with Subnet-A to include a route targeting the S3 Gateway VPC endpoint for the S3 prefix list.
To restore internet access for the EC2 instance, the subnet's route table must include a route directing to the Internet Gateway (IGW). To allow private access to S3, the route table must also include a route for the S3 prefix list pointing to the S3 Gateway VPC endpoint. These two steps configure the correct routing pathways for both destinations.
Step-by-Step Solution
Key Concept
Troubleshooting routing in AWS VPCs for both internet access (using an Internet Gateway) and AWS service access (using a Gateway VPC Endpoint).