An application runs on Amazon EC2 instances in private subnets across two Availability Zones (`us-east-1a` and `us-east-1b`) in a VPC. The instances continuously ingest sensor data and send it to an Amazon Kinesis data stream in the same region, transferring approximately of data monthly. Currently, all internet-bound traffic from these subnets routes through a single NAT Gateway located in `us-east-1a`. The monthly AWS bill shows high NAT Gateway data processing charges. Which solution will minimize the data transfer and processing costs while maintaining secure, private connectivity to the Kinesis data stream?
- Create an Interface VPC Endpoint (AWS PrivateLink) for Amazon Kinesis in both Availability Zones, and enable Private DNS for the endpoint.Cevap
- BCreate a Gateway VPC Endpoint for Amazon Kinesis, and associate it with the route tables of the private subnets in both Availability Zones.
- CDeploy a second NAT Gateway in `us-east-1b`, and update the route table for the subnet in `us-east-1b` to route traffic through the new NAT Gateway.
- DAssociate an Internet Gateway with the VPC, assign public IP addresses to the EC2 instances, and update the route tables to route Kinesis traffic directly to the Internet Gateway.
Cevap
Create an Interface VPC Endpoint (AWS PrivateLink) for Amazon Kinesis in both Availability Zones, and enable Private DNS for the endpoint.
The correct solution is to use Interface VPC Endpoints (AWS PrivateLink) for Amazon Kinesis with Private DNS enabled. Interface VPC Endpoints route traffic privately over the AWS backbone network, bypassing the NAT Gateway entirely. The data processing rate for Interface VPC Endpoints is , which is much lower than the NAT Gateway processing fee of . In addition, placing an interface endpoint in each Availability Zone eliminates cross-AZ data transfer fees. Enabling Private DNS ensures that the application can query Kinesis using its standard DNS names without code modifications.
Adım Adım Çözüm
Anahtar Kavram
Using Interface VPC Endpoints (AWS PrivateLink) to optimize data transfer costs by bypassing NAT Gateways for internal AWS service traffic.