nerdexam
Amazon

DVA-C02 · Question #604

A developer is migrating a containerized application from an on-premises environment to the AWS Cloud. The developer is using the AWS CDK to provision a container in Amazon ECS on AWS Fargate. The con

The correct answer is B. Confirm that the target group port matches the port mappings in the ECS task definition. E. Confirm that the ALB listener on the mapped port has a default action that forwards to the correct. The target group port in the ALB must match the port specified in the ECS task definition. If there is a mismatch, the ALB health check will fail since it cannot correctly route traffic to the container. The ALB listener must have a default action that forwards requests to the co

Submitted by haruto_sh· Mar 5, 2026Troubleshooting and Optimization

Question

A developer is migrating a containerized application from an on-premises environment to the AWS Cloud. The developer is using the AWS CDK to provision a container in Amazon ECS on AWS Fargate. The container is behind an Application Load Balancer (ALB). When the developer deploys the stack, the deployment fails because the ALB fails health checks. The developer needs to resolve the failed health checks. Which solutions will meet this requirement? (Choose two.)

Options

  • AConfirm that the capacity providers for the container have been provisioned and are properly
  • BConfirm that the target group port matches the port mappings in the ECS task definition.
  • CConfirm that a hosted zone associated with the ALB matches a hosted zone that is referenced in
  • DConfirm that the ALB listener on the mapped port has a default action that redirects to the
  • EConfirm that the ALB listener on the mapped port has a default action that forwards to the correct

How the community answered

(58 responses)
  • A
    10% (6)
  • B
    64% (37)
  • C
    21% (12)
  • D
    5% (3)

Explanation

The target group port in the ALB must match the port specified in the ECS task definition. If there is a mismatch, the ALB health check will fail since it cannot correctly route traffic to the container. The ALB listener must have a default action that forwards requests to the correct target group associated with the ECS service. If this configuration is missing, the health check will fail as no traffic is routed to the service.

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice