AWS CodeDeploy
Developer Tools · Common, learn when you need it
Puts a new version of your app onto servers gradually, and rolls back if it breaks.
Changing the menu in one branch of a restaurant first. If customers complain, the other branches never get the new menu.
What it actually does
CodeDeploy pushes code to EC2 or on premises servers, or shifts traffic for Lambda and ECS. You get canary and linear rollouts, and automatic rollback on a CloudWatch alarm. On EC2 it needs an agent installed and an appspec.yml with lifecycle hooks, which is the fiddly part. It moves traffic, it does not build anything.
Reach for it when
- You run on EC2 and want staged rollouts instead of replacing everything at once
- You want an automatic rollback tied to an error alarm
- You need blue green traffic shifting for ECS or Lambda
Do not reach for it when
- You deploy containers and already use ECS rolling updates, that is often enough
- Your infrastructure is defined in CDK or CloudFormation and deploys with the stack
- You want the whole pipeline, that is CodePipeline
One small example
Sending 10 percent of traffic to a new Lambda version for five minutes, then all of it if no errors fire.
How you pay
Free for Lambda and ECS deployments. On premises instance deployments cost per instance update, and EC2 deployments are free but you still pay for the instances.
Usually sits next to
The real source
This is a simplified summary written for people learning AWS. The official AWS documentation is the authoritative word and it wins wherever this page disagrees with it.