OpsCanary
awscicdPractitioner

Mastering Deployment Configurations in CodeDeploy

5 min read AWS DocsApr 28, 2026
Share
PractitionerHands-on experience recommended

Deployment configurations in CodeDeploy exist to help you manage application updates with minimal disruption. They define the rules for how your deployments should behave, ensuring that a certain number of instances remain healthy during the process. This is vital for maintaining application availability and performance while rolling out new features or fixes.

When you deploy to an EC2 or on-premises compute platform, the deployment configuration specifies the 'minimum healthy hosts' value, which dictates how many instances must remain operational at all times. You can also set a 'minimum healthy hosts per zone' value to further refine your deployment strategy. CodeDeploy offers several predefined deployment configurations, including canary, linear, and all-at-once. For example, the canary configuration allows you to shift a small percentage of traffic to the new version before fully deploying, which helps catch issues early. However, if you're using a Network Load Balancer, you're limited to the CodeDeployDefault.ECSAllAtOnce configuration.

In production, understanding these configurations is key to successful deployments. Be aware that there are no predefined configurations supporting the zonal configuration feature, so if you need that, you'll have to create a custom deployment configuration. Additionally, managing Amazon ECS blue/green deployments with CloudFormation has regional limitations, which could impact your deployment strategy if you're operating in those areas. Keep these nuances in mind to avoid pitfalls during your deployment process.

Key takeaways

  • Define minimum healthy hosts to maintain application availability during deployments.
  • Utilize canary deployments to mitigate risks by gradually shifting traffic.
  • Create custom deployment configurations if you need zonal configuration features.
  • Remember that only CodeDeployDefault.ECSAllAtOnce is supported with Network Load Balancers.
  • Check regional limitations for ECS blue/green deployments when using CloudFormation.

Why it matters

Properly configuring deployments can significantly reduce downtime and improve user experience during updates. This is critical for maintaining trust and performance in production environments.

Code examples

plaintext
CodeDeployDefault.ECSAllAtOnce

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.