CodeDeploy
💡 Definition
AWS CodeDeploy is a service that automates code deployments to any instance, including Amazon EC2 instances, on-premises servers, serverless Lambda functions, and Amazon ECS services.
🔑 Key Concepts
- Automated Deployments: Handles the complexity of updating applications.
- In-Place Deployments: Updates application code on the instances directly.
- Blue/Green Deployments: New version deployed to a separate set of instances, then traffic is shifted (for zero downtime).
- Deployment Groups: Sets of instances where you want to deploy your application.
- Application Revision: The new version of your application code and associated files.
⚙️ How it Works
- Define Application: Register your application with CodeDeploy.
- Create Deployment Group: Specify the target instances (e.g., specific EC2 tags, Lambda function).
- Upload Revision: Upload your new code (e.g., to S3 or CodeCommit).
- Deploy: CodeDeploy follows a specified deployment configuration (e.g., "AllAtOnce," "OneAtATime," "HalfAtATime") to update your application.
🎯 Use Cases
- Continuous Deployment: Automating the release process as part of a CI/CD pipeline.
- Reducing Downtime: Performing updates without service interruption using blue/green deployments.
- Consistent Deployments: Ensuring the same code is deployed across all target environments.
💰 Pricing Model
- EC2/On-Premises Deployments: Free.
- Lambda Deployments: Free.
- Amazon ECS Deployments: Charged per deployment.
📝 Exam Tips (CLF-C02)
- CodeDeploy automates application deployments.
- Supports deployments to EC2, on-premises, and Lambda.
- Focuses on reducing downtime during deployments.
- Part of the AWS Developer Tools suite (alongside CodeCommit, CodeBuild, CodePipeline).
See Also: * EC2 * Lambda * CloudFormation * CodePipeline