ECS container best practices

0

I have 10 docker images that our system uses which are meant to be portable between different container management systems. To provide the first iteration of AWS capable images, I have created the repository for each of them in AWS and the necessary roles and resources to run them. I have successfully brought them up as services in a cluster and gotten them to talk to each other and accessed the NGINX container service from the internet.

How can I replicate the cluster without having to build it by hand every time? Is there a component of AWS that I can use to model what I have then pull that in and run it? In other words is there an equivalent to Docker-Compose that I can use to run against, and it stands up the containers as services and brings in the necessary resources?

2 Answers
0
Accepted Answer

Hello :) You are doing the right thing to have an ECR Repo per service image, that allows each of these to evolve over time on their own.

Creating and updating ECS services all the time can be cumbersome, especially if you are starting with AWS & ECS. As per your docker-compose question, there is ECS Compose-X which does just that (and more!). You will be able to use the docker compose format to define your services, sidecars if you need to, and what it does is generate the AWS CloudFormation templates to use and deploy all your services. We use it in our CICD pipelines and it orchestrates everything we need to do. It also allows to define other AWS resources you might need (new or existing ones) that your services need access to, and grant least-privileges permissions to the IAM roles automatically.

There are plenty of examples/guides in the labs to get started, and if you have any issues, feel free to join the Slack Channel to ask for help, or raise an issue in GitHub.

Hope this helps,

profile picture
answered a year ago
0

Wow! Thanks. That is what I was looking for. Just starting out with this, I didn't know if I was going down the wrong path doing everything by hand and there were screens somewhere that did it for me but I just couldn't find them. Now it seems that there really aren't any. The support guy gave me a link: https://aws.amazon.com/blogs/containers/automated-software-delivery-using-docker-compose-and-amazon-ecs/ which also took me down a similar path but with a different outcome. I already popped over to compose-x and it seems extremely helpful and also what I am looking for.

Chris
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions