CodeDeploy Overview and Deployment Types
What you'll learn: How AWS CodeDeploy automates application deployments and the three main deployment strategies it offers.
What is CodeDeploy?
AWS CodeDeploy is a fully managed deployment service that automates software deployments to various compute services like EC2 instances, Lambda functions, and on-premises servers. Think of it as a delivery driver who knows multiple routes to get packages to their destination safely — CodeDeploy handles the complex orchestration of deploying your application code while minimizing downtime and risk.
Unlike CodeBuild (which creates your artifacts), CodeDeploy takes those built artifacts and puts them into production.
The Three Deployment Types
In-Place Deployment: The application on each instance is stopped, updated with the new version, and restarted — all on the same instances. It's like renovating your house while still living in it. This approach uses existing infrastructure but causes brief downtime during updates. Best for cost-conscious deployments where some downtime is acceptable.
Blue/Green Deployment: A completely new set of instances (green) is provisioned with the new version while the old instances (blue) continue running. Traffic is switched over once testing succeeds, then blue instances are terminated. It's like building a new house next door, moving in, then demolishing the old one. This provides zero-downtime deployments and easy rollback but doubles infrastructure costs temporarily.
Rolling Deployment: Updates instances in batches, gradually replacing old versions while maintaining partial availability. If you have 10 instances, CodeDeploy might update 2 at a time. Like renovating rooms one at a time while the rest of the house stays functional.
Choosing Your Strategy
Your choice depends on downtime tolerance, budget, and rollback requirements. Blue/green offers maximum safety but highest cost, while in-place is economical but riskier.
Key Takeaway: CodeDeploy automates deployments with three strategies — in-place (update existing), blue/green (parallel environments), and rolling (gradual batches) — each balancing availability, cost, and risk differently.