Q: Does every docker compose yml file is compatible with AWS ECS containers I have a docker-compose yml file. It contains 11 services/sections. I am able to successfully deploy it on Ubuntu EC2 instance. 
Now, I need to host each service/ section from Docker Compose inside AWS ECS. As per my understanding, I need to create a task definition from AWS ECS UI. I can look at my docker-compose file for image details, environment variables, labels, and just add it inside the task definition. Then, start the task. Now, my ECS tasks should work without any additional settings.
Is this a correct understanding that any service/section docker-compose yml file is ECS compatible?

A: To my understanding, ECS still doesn't allow the build command in docker-compose.yml so you will run into some headaches. 
You can build separate images on ECR and have your docker-compose file to run those when you are creating your services. Don't forget to rebuild those images when you are deploying new code.
Sample docker-compose file
version: '3'
services:
  web:
    container_name: web
    image: some_repository/web:latest
  db:
    container_name: db
    image: some_other_repo/db:latest

Hope this helps.
