DEV Community

Cover image for Docker + AWS (CodeCommit +CodeBuild+ECR) = Release breeze
Juan
Juan

Posted on

Docker + AWS (CodeCommit +CodeBuild+ECR) = Release breeze

Hi! This is my very first post here and I'm happy to share something it may be useful for you.

When working with a Docker projects, AWS provides a couple tools that may come handy to you.

1) One is ECR.
Amazon Elastic Container Registry is a Docker registry service fully managed by AWS. Here you can push you Docker images the same way as you do to DockerHub. The benefit I get from this is: If you are deploying your Docker image to an AWS EC2 instance, then you are already in the same AWS ecosystem.
Some additional PROS and CONS may be found here

2) Another is AWS CodeCommit
CodeCommit provides a fully-managed source control service that makes it easy to manage application code for any company. You don't need any servers or infrastructure to host the environment where you code lives while your Software engineers work on shipping new releases.
For example, for very small teams(just one Dev) to large ones, you can manage your applications and commit (save your code changes) to CodeCommit, keeping it safe and up-to-date.

3) Last but no Least comes AWS CodeBuild
CodeBuild is a continuous integration service that compiles source code, it can run tests, and also produces software packages that are ready to deploy. You can deploy to any of the environments that are part of your infrastructure.

With these 3 services you can connect your Dev environment to CodeCommit and once you commit and push the changes you are 1 click away of having a new Docker image including the recent changes, that is already deployed to ECR and from there you only need to pull the image and run it.

I've set this up and it will definitely recommend it to anyone that is looking to reduce efforts regarding release and Dev environment's management.

I'm now researching about a way of automating the creation of Release notes out of the commits. Any suggestions?

Hope you enjoyed this article! Let me know if there is anything else I can add to it to make it more useful.

Image credit: happyvalley.dev

Top comments (2)

Collapse
 
paulmicheli profile image
Paul Micheli

Have you got this working in cloud formation as IAC?

It really take this to another level to spin up multiple projects, you use parameters and the same cloud formation template every time.

Collapse
 
juanfara profile image
Juan

Thanks for you comments, Paul !
I still have that one on my pending list.
I know Cloudformation's capabilities but still need to get my hands into it and play around for a bit.
I'll definitely take a look.