Deployment best practices for reliable rollouts using Amazon ECS (SVS340)

Amazon ECS Deployment Best Practices

Safety, Speed, and Visibility for ECS Deployments

Key Takeaways

Safety

  • Define application health criteria and use container health checks and load balancer health checks to ensure safe deployments
  • Ensure application can handle voluntary disruptions during deployments (SIGTERM handling)
  • Leverage task placement constraints and strategies to spread tasks across availability zones for high availability
  • Use task scale-in protection for worker-based applications to prevent interruption during deployments

Speed

  • Optimize deployment speed by tuning min healthy percent and max percent settings
  • Use techniques like lazy loading (SOCI) and Checkpoint Restore to speed up task launches
  • Reduce load balancer deactivation timeout to speed up task shutdown

Visibility

  • Leverage ECS deployment history and service revisions to gain visibility into deployments
  • Use ECS circuit breaker and CloudWatch alarms to detect and automatically roll back failed deployments
  • Monitor deployment velocity using container insights metrics

Recommended Actions

  1. Review your rolling deployment configuration and tune min healthy percent and max percent settings based on your environment (dev vs. production).
  2. Ensure your application health checks are properly defined and can accurately determine when the application is ready to receive traffic.
  3. Validate that your application can gracefully handle voluntary disruptions during deployments (SIGTERM handling).
  4. Explore the use of ECS circuit breaker and CloudWatch alarms to automate deployment rollbacks on failure.
  5. Leverage the resources provided (workshops, blogs, documentation) to continue learning about ECS deployment best practices.

Remember, the goal is to balance safety, speed, and visibility to achieve high deployment velocity without compromising application availability or stability.

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.

Talk to us