AWS CodeDeploy
This is not an exhaustive documentation of all the existing AWS Services. These are summarized notes that I used for the AWS Certifications.
To see the complete documentation, please go to: AWS documentation
Overview
AWS CodeDeploy is a fully managed deployment service that automates software deployments to various compute services, such as Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), AWS Lambda, and your on-premises servers. Use CodeDeploy to automate software deployments, eliminating the need for error-prone manual operations.
-
Deploy our application automatically to multiple EC2 instances.
-
These instances are not managed by Elastic Beanstalk.
-
There are several ways to handle deployments using open source tools (Ansible, Terraform, Chef, Puppet, etc...).
-
CodeDeploy is the alternative to these tools.

How it works
- Each EC2 Machine (or On Premise machine) must be running the CodeDeploy Agent.
- The agent is continuously polling AWS CodeDeploy for work to do.
- CodeDeploy sends appspec.yml file.
- Application is pulled from GitHub or S3.
- EC2 will run the deployment instructions.
- CodeDeploy Agent will report of success/failure of deployment on the instance.
Additional information
- EC2 instances are grouped by deployment group (dev/test/prod).
- Lots of flexibility to define any kind of deployments.
- CodeDeploy can be chained into CodePipeline and use artifacts from there.
- CodeDeploy can re-use existing setup tools, works with any application, auto scaling integration.
- Note: Blue / Green only works with EC2 instances (not on premise).
- Support for AWS Lambda deployments (we’ll see this later).
- CodeDeploy does not provision resources.