Slow code location redeployment speed in Hybrid ECS deployments

Last updated: October 9, 2025

When using a Hybrid ECS deployment in Dagster+, several factors can influence the speed of redeploying a code location cause it to be slower than desired. Understanding these factors can help you optimize your deployment process and reduce waiting times.

Key factors affecting redeployment speed

  1. Docker image size: Larger Docker images can significantly increase deployment time. The larger the image, the longer it takes to pull and deploy.

  2. ECS agent limitations: Fargate, which is used by the ECS agent, doesn't have an image cache. This means that for each deployment, a new task needs to be spun up and the Docker image needs to be pulled again.

  3. Network speed: The speed of pulling the Docker image from your container registry can affect deployment times.

Optimization tips

  1. Optimize Docker image size: Try to reduce the size of your Docker image where possible. Use multi-stage builds, minimize the number of layers, and only include necessary dependencies.

  2. Consider using ECR: If you are not already doing so, consider using Amazon ECR (Elastic Container Registry), which can provide faster pull times within the AWS ecosystem.

  3. Implement caching strategies: While Fargate doesn't have an image cache, you can implement layer caching in your CI/CD pipeline to speed up image builds.