List of Amazon ECS best practices

ECS Best Practices

Containers may have been a buzzword a few years back, but we have now reached a point where business can’t ignore them. These Amazon ECS best practices should help you prepare for your container adventure in the cloud.

As flexible and reliable as ECS is, it is not trivial to get it all working.

Amazon ECS best practices

The incredible technology that a solution like AWS EC2 Container Service offers does not come easy, as there are several areas that demand your attention once you go this route — setting it all up and running apps using Docker is not without its challenges.

Here is a collection of some pointers to help you think around these:

  • The biggest challenge is that ECS is nothing but an API on its own, meaning you have to configure your own instances, load balances, logging, monitoring, and create Task Definitions.
  • Plan, in detail, what infrastructure you need, and then automate its setup first, before you get down to the business of running a container.
  • Even though you may technically be running a container on ECS, traditional instance management still apply. In fact, it is even more important than before, because heavy container workloads are often more demanding on an instance.
  • Your clusters should be in an AutoScaling Group to preserve instance capacity, and you will need to apply AMI updates gracefully, among other things.
  • The dynamic and ephemeral nature of containers causes its own set of problems, particularly when it comes to logs and events. The best solution here is to run an additional agent as a container on every instance to monitor all other containers, subscribe to their logs, and forward logs to CloudWatch.
  • This complex system often adds up to something that is often hard to understand, so if you are working on a large scale, be sure to have a proficient and experienced team on hand.

In many ways, working with ECS is significantly more challenging than the much simpler EC2 deployments. And that is because the container service is basically adding an entirely new layer of complexity to your cloud implementation.

But is it all worth it?

The landscape has improved much over the past couple of years, particularly as enterprises have taken to the philosophy of running their workload in containerized environments. This has led to improvements in products, services, and documentation for solutions like ECS, Docker, and Kubernetes, which ultimately help developers as they start with this fascinating new technology.

Deployments are faster and safer than ever before, and sophisticated automation has led to the creation of some really capable monitoring algorithms that work consistently to verify that things are running as they should.

Then again, these are still early days for these tools.

The future promises much.