Which combination of actions should the solutions architect take to accomplish this goal?
(Choose two.)
Create an internet gateway. Attach the internet gateway to the VPC.
Create an internet gateway. Attach the internet gateway to the instance’s subnet.
Create an internet gateway. Attach the internet gateway to the instance.
Add a route to the route table of the instance’s subnet. Route traffic from the instance’s subnet to the internet gateway.
Add a route to the route table of the instance’s subnet. Route traffic from the internet gateway to the instance’s subnet.
Explanations:
An internet gateway is required to allow communication between the instances in a VPC and the internet. By creating an internet gateway and attaching it to the VPC, the VPC will be able to route internet traffic.
An internet gateway cannot be attached to an individual instance’s subnet. It must be attached to the VPC itself.
An internet gateway cannot be directly attached to an EC2 instance. It must be associated with the VPC to provide internet access to instances in that VPC.
After creating an internet gateway and attaching it to the VPC, a route must be added to the subnet’s route table to route traffic destined for the internet to the internet gateway. This allows outgoing traffic from the subnet to the internet.
The route table should not route traffic from the internet gateway to the instance’s subnet; rather, it should route traffic from the instance’s subnet to the internet gateway. This option misrepresents how routing works in AWS.