An enterprise runs a payment processing microservice hosted on Amazon ECS tasks in VPC A within the provider AWS account. An order management application running on Amazon EC2 instances in VPC B within a separate consumer AWS account needs to securely access the payment API. The applications are currently connected using a VPC peering connection, but the security team wants to restrict network connectivity so that VPC B can only access the payment microservice and cannot initiate any other traffic to VPC A. Additionally, access must be restricted to only the specific IAM role associated with the order management application. Which two actions should a Solutions Architect take to meet these requirements?
- Configure an Amazon VPC Endpoint Service in VPC A backed by a Network Load Balancer, and add the Amazon Resource Name (ARN) of the specific consumer IAM role to the allowed principals list of the Endpoint Service.Cevap
- Create an interface VPC endpoint in VPC B pointing to the VPC Endpoint Service, and attach a VPC endpoint policy to the interface VPC endpoint that permits access only to the specific consumer IAM role.Cevap
- CMaintain the VPC peering connection, and attach a Service Control Policy (SCP) to the consumer account's Organizational Unit that restricts the allowed destinations to the IP addresses of the provider's ECS tasks.
- DCreate a Route 53 Private Hosted Zone (PHZ) in VPC A, associate the PHZ with VPC B, and configure a resource-based policy on the hosted zone to restrict DNS resolution requests to the consumer IAM role.
- EEstablish network connectivity via AWS Transit Gateway, and configure AWS KMS using an AWS-managed key (aws/kms) to sign the API requests between the accounts to enforce principal validation.
Cevap
Configure an Amazon VPC Endpoint Service in the provider account backed by a Network Load Balancer and add the consumer IAM role to the allowed principals list, then create an interface VPC endpoint in the consumer account pointing to this service with an endpoint policy that permits access only to that specific IAM role.
The correct options work together to establish AWS PrivateLink. Configuring a VPC Endpoint Service backed by a Network Load Balancer in the provider account restricts network traffic solely to the exposed service, preventing general VPC-to-VPC routing. By adding the specific consumer IAM role to the Allowed Principals of the Endpoint Service, we ensure only that identity can establish the connection. Creating an interface VPC endpoint in the consumer account with a custom VPC endpoint policy restricts endpoint access to only the authorized consumer IAM role.
Adım Adım Çözüm
Anahtar Kavram
AWS PrivateLink enables secure, private connectivity to services hosted on AWS without exposing the VPCs to the public internet or establishing full network routing like VPC Peering or Transit Gateway. Granular identity-based security is achieved by combining Endpoint Service Allowed Principals (provider side) and VPC Endpoint Policies (consumer side).