nerdexam
Amazon

DVA-C02 · Question #578

A developer is migrating a containerized application from an on-premises environment to an Amazon ECS cluster. In the on-premises environment, the container uses a Docker file to store the application

The correct answer is B. Add the details from the docker-compose.yml file to an ECS task definition. Associate the task. Amazon ECS does not natively process docker-compose.yml files. Instead, the configurations from docker-compose.yml must be converted into ECS-compatible configurations within a task definition. Task definitions are the primary way to specify container configurations in ECS, inclu

Submitted by satoshi_tk· Mar 5, 2026Deployment

Question

A developer is migrating a containerized application from an on-premises environment to an Amazon ECS cluster. In the on-premises environment, the container uses a Docker file to store the application. Service dependency configurations such as databases, caches, and storage volumes are stored in a docker-compose.yml file. Both files are located at the top level of the code base that the developer needs to containerize. When the developer deploys the code to Amazon ECS, the instructions from the Docker file are carried out. However, none of the configurations from docker-compose.yml are applied. The developer needs to resolve the error and ensure the configurations are applied. Which solution will meet these requirements?

Options

  • AStore the file path for the docker-compose.yml file as a Docker label. Add the label to the ECS
  • BAdd the details from the docker-compose.yml file to an ECS task definition. Associate the task
  • CCreate a namespace in the ECS cluster. Associate the docker-compose.yml file to the
  • DUpdate the service type of the ECS cluster to REPLICA, and redeploy the stack.

How the community answered

(34 responses)
  • A
    18% (6)
  • B
    71% (24)
  • C
    3% (1)
  • D
    9% (3)

Explanation

Amazon ECS does not natively process docker-compose.yml files. Instead, the configurations from docker-compose.yml must be converted into ECS-compatible configurations within a task definition. Task definitions are the primary way to specify container configurations in ECS, including service dependencies like databases, caches, and volumes. Steps to Resolve the Error: Extract the configurations from the docker-compose.yml file. Map the dependencies and settings to the appropriate ECS task definition fields. Deploy the task definition to the ECS cluster.

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice