A company is hosting a secure data processing application on Amazon EC2 instances within a private subnet. The instances must retrieve training datasets from a specific Amazon S3 bucket. Security policies dictate that the VPC must not have an Internet Gateway or a NAT Gateway, and the EC2 instances must be restricted from accessing any other S3 buckets in AWS. A solutions architect deploys a Gateway VPC Endpoint for Amazon S3 to enable private connectivity. Which configuration should the solutions architect implement to restrict the instances to only access the specified S3 bucket?
- AConfigure the Security Group associated with the EC2 instances to restrict outbound traffic to the Amazon Resource Name (ARN) of the specific S3 bucket.
- BAdd a route to the private subnet's route table that maps the specific S3 bucket's IP addresses to the S3 Gateway VPC endpoint.
- Attach a custom VPC endpoint policy to the S3 Gateway VPC endpoint that allows S3 actions only when the resource matches the specific S3 bucket's ARN.Cevap
- DDeploy an AWS WAF Web ACL on the subnet's network interfaces to inspect and deny outbound requests destined for unauthorized S3 buckets.
Cevap
Attach a custom VPC endpoint policy to the S3 Gateway VPC endpoint that allows S3 actions only when the resource matches the specific S3 bucket's ARN.
A VPC endpoint policy is an IAM resource policy that you attach to a VPC endpoint to control access to the service. By default, endpoints have full access. A custom policy can restrict access to specific S3 buckets by specifying their ARNs in the 'Resource' block, ensuring that EC2 instances using the endpoint can only interact with the approved bucket.
Adım Adım Çözüm
Anahtar Kavram
VPC Endpoint Policies
Tahmini Süre:1m 30s