What would you like to see in a book about Elixir Deployments on AWS ECS?



At our company we have found a smooth and robust deployment strategy with AWS ECS and I am writing a small book on this subject. I am going to document all the aspects of a deployment using a simple app as an example. I’d love to know your thoughts on things that should be included in this book. I am using Leanpub to set up and publish the book: https://leanpub.com/elixirdeploymentsonawsecs

Do you think this would be a good resource? Are there any topics that you’d like to see in the book?


As someone running an Elixir system on AWS ECS, I definitely find a book on the topic interesting. When I started a bit over a year ago working on our system, I basically had to figure out everything on my own.
Recommendations and good/bad experiences would have helped me a lot.

Currently, we are running isolated Elixir nodes, but in the near future I am looking into clustering things. If you have any experiences to share regarding that, I would be really thrilled to read about it. Other interesting topics would be which CI setup to use (I use Jenkins), and how to setup and maintain the AWS infrastructure (I use Ansible).


We use Jenkins too, our setup is mostly independent of jenkins as everything runs inside a docker container, the tests run using docker-compose. I am planning on adding a chapter on clustering too :smiley:


Sounds very interesting. I’ve signed up for the notification on leanpub for the book!


I would find this interesting. Currently I’m using Heroku but I’m looking into other options so that I can take advantage of OTP.


I know you mentioned you use Jenkins. But what I’d like personally is how to setup a deploy pipeline in GitLab CI that would deploy to staging, production etc…

Step by step, will full instructions, assuming the reader is brand new to the topic and needs hand holding :slight_smile:


I am with @bmitch on this one… I also would like to see an Gitlab CI example alongside with the Jenkins one.


I just went through learning how to deploy an app to EC2. By far the biggest hurdle was understanding the overall deployment picture.

This video ultimately helped me understand the deployment flow between pushing code to a production-like build environment and subsequent deployment and starting of the release.

I understand you’re mostly targeting ECS, but a top-level view helped me the best.


Thanks, that looks like a good candidate for CI :slight_smile:


I would be keen to see other deployment models and not just Docker. We have been deploying native distillery releases as Debian packages for our distributed Elixir nodes. The AWS (not just EC2) infrastructure is managed in Terraform scripts along with some custom bash scripts.


Thanks for the idea. This would be a whole another beast. We have a rails application which gets installed this way using debs and we use chef internally. If you are on AWS the convenience of ECS is hard to match. I’ll see if I can research these methods and do a few blog posts on them :smiley:


Oh, and another interesting topic is credential management. I am currently using a mixture of HashiCorp’s Vault and Jenkins build-in credentials management. It’s not the most elegant solution, but it works.


I am planning to cover this, It is a bit tricky with docker but we’ve found a good way to do it using AWS SSM :smiley:


That’s nice. I also use ECS with docker in AWS. For clustering I use weave.

What about blue/green deployments?


I’m looking forward to reading more about that :smile:.
To be honest, I haven’t really looked into AWS SSM. It’s a daunting task to get a good overview of all AWS services.


That certainly looks interesting. Thanks for the pointer.


Amazon Fargate ? :slight_smile:


ECS does this out of the box, it spins up new containers and drains the old containers and then shuts them down :slight_smile:


ECS and Fargate are very similar, only Fargate is actually easier to setup because you don’t need to setup a cluster. I’ll try and add that in :slight_smile: I think at the current price points having a cluster and ECS is better cost wise. If you can afford it Fargate is definitely better maintenance wise. Another advantage of using ECS is having the ability to use spot instances in your cluster (at least for non prod) thereby cutting a lot of costs.


I’m very interested! I am working on my size project and had hard time deploying the app when I first tried to deploy. I am currently using a service called nanobox but definitely interested in other deployment methods.