AWS and Docker collaborate to simplify the developer experience

Developers can now use Docker Compose and Docker Desktop to deploy applications to Amazon ECS

If you were to ask any developer who has worked with containers, you find out they have used or are aware of Docker Desktop and the Docker CLI for building applications on their desktop. They’ve also most likely used Docker Compose, which is a tool that allows developers to define and run multi-container applications via a YAML file. While developers love the simplicity of Compose, they haven’t had a simple way to use Docker and deploy to AWS in a seamless manner from their local development environment. So with that said, we are excited that Docker announced a collaboration today with AWS that allows developers to use Docker Compose and Docker Desktop to deploy applications on Amazon ECS on AWS Fargate. This new functionality streamlines the process of deploying and managing containers in AWS from a local development environment running Docker.

Previously, taking a local Compose file and running it on Amazon ECS posed a challenge because of constructs in Amazon ECS that were not part of the Compose specification, but were necessary for the application to run in AWS. For example, in order to run a simple Compose file and deploy to Amazon ECS, a developer would first need to leave the Docker experience and configure an Amazon VPC, Amazon ECS Cluster, and Amazon ECS Task Definition to name just a few of the AWS resources needed. As part of the collaboration, developers can continue to leverage tools like the Docker CLI and Docker Compose without needing to setup those resources in AWS outside of the Docker experience because it is now handled natively. By creating and switching to a new context in Docker, a developer can simply issue an up command via Docker Compose, which will create those resources automatically in AWS. This provides an easy path for developers to deploy and run highly secure and scalable production applications in Amazon ECS.

While the new process is fully documented on the Docker blog and the GitHub repository, let’s explore the beta experience where we show a simple frontend web application using NGINX talking to a backend written in Go defined in our docker-compose.yaml file. In the beta, users will notice an additional ecs syntax in the docker commands. This is because we will leverage a plugin in the short term but for GA, the experience will be integrated with Docker Desktop and a developer can simply switch contexts to run their applications on Amazon ECS leveraging the Docker commands they are used to. As demonstrated below, the setup is straightforward where a user will define the AWS Profile, ECS cluster name, and the AWS Region where you want to deploy your applications. By simply issuing a docker ecs compose up, the application and the resources needed for it to run will be created in AWS!

Future Plans and Next Steps

It’s our vision that once the Docker ECS integration reaches GA, users will begin to migrate their production workloads over to the new experience. For users of the Amazon ECS CLI v1, we look forward to your feedback on the new Docker experience but encourage you to continue to leverage the existing ECS CLI for production workloads.

Having said that, we are excited for you to try out the public beta. In order to get started, you can check out the Docker blog to learn how to sign up for a Docker ID and download the latest version of Docker Desktop Edge, which includes the new plugin. You can also head over to the GitHub repository to follow the steps there. Try it out, report issues, and let us know what other features you would like to see on the Roadmap!

Carmen Puccio

Carmen Puccio

Carmen is a Principal Solutions Architect at AWS working within the APN Program and with container partners to help customers adopt container technologies as part of their modernization efforts. Before AWS, Carmen worked at The Associated Press for over 15 years and you can find him on Twitter at @CarmenAPuccio.