What Is AWS CodeDeploy?
AWS CodeDeploy deploys application revisions (code, scripts, web assets, multimedia) to these targets:- Amazon EC2 instances
- On-premises servers
- AWS Lambda functions
- Amazon ECS services
- AWS Fargate tasks

- Amazon S3
- AWS CodeCommit
- GitHub
- Bitbucket

- Automatic scaling from a single instance to tens of thousands
- Built-in deployment strategies to minimize downtime
- Monitoring and rollback capabilities via AWS Console, CLI, or SDKs

Deployment Strategies
AWS CodeDeploy offers four primary strategies:Blue/Green Deployments
In a blue/green deployment, you maintain:- Blue: The active production environment.
- Green: A staging environment with the new release.

Traffic Shifting Configurations
You can integrate health checks or manual approval actions before, during, or after traffic shifts to ensure deployment safety.
Managing Deployments with AppSpec
To coordinate deployments, CodeDeploy uses:- CodeDeploy Agent
Installed on each target to execute deployment tasks.
Ensure the CodeDeploy Agent runs with sufficient IAM permissions and is kept up to date.
- AppSpec File (
appspec.yml)
A YAML manifest that maps source files to destination paths and defines lifecycle event hooks.
