DEV Community

MOURIK
MOURIK

Posted on

docker containers deployment in ECS EC2

Hello community,

I am looking for deployment best practices. i want to deploy docker images in ECS cluster, i want to know if terraform is a good way to perform container deployment in ECS, is there a better way adapted to this kind of deployment?
Thanks in advance.

Top comments (5)

Collapse
 
nathanjohnson320 profile image
Nathaniel Johnson

I've used pulumi to deploy my ecs fargate containers for several months now without issue. It's about 12 lines of code to do it and is a lot simpler than terraform. pulumi.com/docs/tutorials/aws/ecs-...

Collapse
 
mourik profile image
MOURIK

I just discover Pulumi this weekend :) in FOSDEM Bruxelles. i will check this possibility. Do you know if there a state after deployment like tfstate and also if i can manage rollback also with pulumi. thanks in advance

Collapse
 
nathanjohnson320 profile image
Nathaniel Johnson

They do have a state and you can configure that to be stored in pulumi or anywhere wise really pulumi.com/docs/intro/concepts/state/ for rollback it doesn't do them automatically on failure so I normally have to revert in git and then run pulumi up

Collapse
 
rolfstreefkerk profile image
Rolf Streefkerk

Terraform works well, I use it for a production grade solution with ECS Fargate.
If you deploy your infrastructure with Terraform anyway, this is a recommended approach.

Collapse
 
mourik profile image
MOURIK

Thanks very much for your response.