Kestrel Analytics is modernizing its legacy telemetry processing application by migrating it from an on-premises data center to AWS. The application processes high-throughput sensor data and writes the results to a self-managed database cluster running in a private subnet within a Virtual Private Cloud (VPC). The analytics team wants to containerize the application and run it on Amazon ECS using the AWS Fargate launch type to reduce operational overhead. The tasks must securely connect to the database cluster and must not have direct public internet connectivity, while the database security group must restrict inbound traffic to only the tasks. Which network configuration should a solutions architect recommend to meet these requirements?
- Configure the ECS task definition to use the awsvpc network mode. Deploy the Fargate tasks in private subnets, and configure the database security group to allow inbound traffic from the security group assigned to the ECS tasks.Cevap
- BConfigure the ECS task definition to use the bridge network mode to allow container port mapping. Deploy the Fargate tasks in private subnets, and configure the database security group to allow inbound traffic from the security group of the underlying container instances.
- CConfigure the ECS task definition to use the host network mode. Deploy the Fargate tasks in private subnets, and resolve the database hostname using a Route 53 Private Hosted Zone that is created but not associated with the VPC.
- DConfigure the ECS task definition to use the awsvpc network mode. Deploy the Fargate tasks in a single Availability Zone, and configure the route tables to direct all database-bound traffic through a single NAT Gateway deployed in a single public subnet.
Cevap
Configure the ECS task definition to use the awsvpc network mode. Deploy the Fargate tasks in private subnets, and configure the database security group to allow inbound traffic from the security group assigned to the ECS tasks.
Configuring the ECS task definition to use the awsvpc network mode allows each task to receive its own ENI and security group. The database security group can then be configured to allow inbound access specifically from the task security group, ensuring secure, least-privilege access.
Adım Adım Çözüm
Anahtar Kavram
AWS Fargate tasks only support the awsvpc network mode, which allows them to obtain dedicated ENIs and use security groups to secure task-to-database communication.