Skill 3.3.4
Deploy application revisions to target environments by using AWS CodeDeploy.
Key Concepts
A CodeDeploy application targets one compute platform (EC2/On-premises, AWS Lambda or Amazon ECS). A deployment group names the targets, such as instances with a given tag or an Auto Scaling group, together with the deployment configuration, CloudWatch alarms and rollback settings. A revision is the bundle to deploy, stored in S3 or GitHub for EC2, and the appspec.yml file lists the files to copy and the lifecycle hook scripts to run, such as BeforeInstall, AfterInstall and ValidateService.
All-at-once or in-place deployments are fast but risk downtime and slow rollbacks. Rolling deployments update a batch at a time. Blue/green deployments run the new version alongside the old and switch traffic when it is ready, allowing instant rollback. Canary deployments send a small percentage of traffic first, and linear deployments shift traffic in equal steps.
CodeDeploy implements these for EC2 (in-place or blue/green), Lambda (canary, linear, all-at-once through alias weights) and ECS (blue/green with canary or linear traffic shifting). Elastic Beanstalk offers all-at-once, rolling, rolling with additional batch, immutable and traffic splitting, and API Gateway supports canary releases on stages.