サービス · Developer Tools
AWS CodeDeploy
Deploy to EC2, Lambda or ECS with an appspec, lifecycle hooks and automatic rollback.
このレッスンはまだ翻訳されていないため、英語で表示しています。
EC2 or on premises
- Modes
- In-place or blue/green
- Configurations
- AllAtOnce, HalfAtATime, OneAtATime
AWS Lambda
- Modes
- Blue/green by alias weight
- Configurations
- Canary, linear, all-at-once
Amazon ECS
- Modes
- Blue/green by task set
- Configurations
- Canary, linear, all-at-once
| Platform | Modes | Configurations |
|---|---|---|
| EC2 or on premises | In-place or blue/green | AllAtOnce, HalfAtATime, OneAtATime |
| AWS Lambda | Blue/green by alias weight | Canary, linear, all-at-once |
| Amazon ECS | Blue/green by task set | Canary, linear, all-at-once |
EC2 or on premises
- Lifecycle hooks
- BeforeInstall, AfterInstall, ApplicationStart, ValidateService
- Used for
- Stop, install, start and check
AWS Lambda
- Lifecycle hooks
- BeforeAllowTraffic, AfterAllowTraffic
- Used for
- Test the new version
Amazon ECS
- Lifecycle hooks
- AfterAllowTestTraffic, BeforeAllowTraffic, AfterAllowTraffic
- Used for
- Test on test traffic first
| Platform | Lifecycle hooks | Used for |
|---|---|---|
| EC2 or on premises | BeforeInstall, AfterInstall, ApplicationStart, ValidateService | Stop, install, start and check |
| AWS Lambda | BeforeAllowTraffic, AfterAllowTraffic | Test the new version |
| Amazon ECS | AfterAllowTestTraffic, BeforeAllowTraffic, AfterAllowTraffic | Test on test traffic first |
1 / 2
EC2 or on premises
- Lifecycle hooks
- BeforeInstall, AfterInstall, ApplicationStart, ValidateService
- Used for
- Stop, install, start and check
AWS Lambda
- Lifecycle hooks
- BeforeAllowTraffic, AfterAllowTraffic
- Used for
- Test the new version
| Platform | Lifecycle hooks | Used for |
|---|---|---|
| EC2 or on premises | BeforeInstall, AfterInstall, ApplicationStart, ValidateService | Stop, install, start and check |
| AWS Lambda | BeforeAllowTraffic, AfterAllowTraffic | Test the new version |
2 / 2
Amazon ECS
- Lifecycle hooks
- AfterAllowTestTraffic, BeforeAllowTraffic, AfterAllowTraffic
- Used for
- Test on test traffic first
| Platform | Lifecycle hooks | Used for |
|---|---|---|
| Amazon ECS | AfterAllowTestTraffic, BeforeAllowTraffic, AfterAllowTraffic | Test on test traffic first |
概要
AWS CodeDeploy deploys a new revision and controls how traffic moves. An appspec file describes the deployment for the compute platform. On EC2 or on-premises servers it lists files to copy and hook scripts. The method is in-place, which updates the same instances, or blue/green, which launches new ones. Predefined configurations are AllAtOnce, HalfAtATime and OneAtATime, and OneAtATime is the default.
概要
For Lambda, the appspec names the function, the alias and the old and new versions, and CodeDeploy shifts the alias weight. For Amazon ECS, it shifts a load balancer between the old and new task sets. AWS now also offers built-in ECS blue/green deployments and recommends them for new services. CodeDeploy still works and the exam still tests it. Both platforms offer canary, linear and all-at-once. Examples are LambdaCanary10Percent5Minutes and ECSLinear10PercentEvery1Minutes. ECS blue/green with a Network Load Balancer supports only all-at-once.
概要
Lifecycle hooks run your validation at set points, such as BeforeAllowTraffic and AfterAllowTraffic for Lambda. A hook returns success or failure to CodeDeploy. Attach CloudWatch alarms, and CodeDeploy rolls back on a failed deployment or an alarm, by redeploying the last good revision or shifting traffic back. For SageMaker AI endpoints use deployment guardrails instead. CodeDeploy fits the Lambda functions and ECS model servers around them.
覚えること
- appspec describes the deployment. Hooks run your checks.
- EC2: in-place or blue/green. Default OneAtATime.
- Lambda and ECS: canary, linear or all-at-once traffic shifting.
- Alarms and failed hooks trigger rollback.
- ECS blue/green on a Network Load Balancer supports only all-at-once.
覚えること
- SageMaker AI endpoints use deployment guardrails, not CodeDeploy.
試験では
- “Shift 10 percent of a Lambda alias for 5 minutes, then the rest” points to LambdaCanary10Percent5Minutes.
- “Run a smoke test before the new ECS tasks get traffic” points to a BeforeAllowTraffic hook.
- “Roll back automatically when an alarm fires” points to CodeDeploy alarms with rollback enabled.
このタスクの内容 · 3.3
- Deployment strategies and rollback
CodePipeline
CodeBuild
CodeDeploy
SageMaker Pipelines
- Automated testing in ML pipelines
- Triggering retraining
Model Registry
Prompt Management
- Agent deployment pipelines and versions
- AI model and prompt testing
- Automating FM deployment and fine-tuned model versions
- RAG update and knowledge base refresh pipelines
Step Functions