A containerized application runs in Amazon ECS on EC2 instances. You only need to capture network traffic exchanged between the ECS tasks themselves. Which combination of steps should you take? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Enable VPC Flow Logs for the elastic network interface of each task., Use the awsvpc network mode in the task definition..
Why this is the answer
To capture network traffic between ECS tasks, you need to ensure each task has its own dedicated network interface and that traffic logging is enabled for those interfaces. The awsvpc network mode assigns a dedicated Elastic Network Interface (ENI) to each task, providing granular network control and allowing each task to have its own private IP address within the VPC. This isolation is crucial for monitoring individual task traffic. Once each task has its own ENI, enabling VPC Flow Logs on these specific ENIs allows you to capture detailed information about the IP traffic going to and from them, including source/destination IPs, ports, protocols, and action (accept/reject). Incorrect options: Enabling CloudWatch Logs for ENIs is not a direct mechanism for capturing network traffic flow data; CloudWatch Logs is a general logging service. The bridge network mode uses a virtual bridge on the host, sharing the host's network interface, making it difficult to isolate traffic per task. The host network mode directly maps container ports to the host's network interface, also making it challenging to differentiate traffic between individual tasks.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed