Which solutions can be used?
(Choose two.)
Deploy a NAT gateway, and configure the route tables accordingly in the VPC where the EC2 instances are running.
Modify the network ACLs with private IP addresses in the routes to connect to Amazon S3.
Modify the security groups on the EC2 instances with private IP addresses in the routes to connect to Amazon S3.
Set up AWS Direct Connect, and configure a virtual interface between the EC2 instances and the S3 buckets.
Set up a VPC endpoint in the VPC where the EC2 instances are running, and configure the route tables accordingly.
Explanations:
A NAT gateway allows EC2 instances without public IPs to initiate outbound traffic to the internet, which can include accessing S3 buckets.
Modifying network ACLs with private IP addresses won’t allow access to S3, as network ACLs control traffic at the subnet level and do not manage routing to S3.
Security groups are used for controlling access to EC2 instances, not for controlling routing or access to S3 directly.
AWS Direct Connect is typically used for dedicated network connections and not necessary for accessing S3 unless there are specific needs for private connectivity, which is not required here.
A VPC endpoint for S3 enables private communication between EC2 instances and S3 without requiring public IPs, ensuring secure access while keeping instances private.