- Newest
- Most votes
- Most comments
The issue you're experiencing with ECS built-in blue/green deployments appears to be related to the transition between deployment strategies. When switching from a BLUE_GREEN deployment strategy back to a ROLLING strategy, the error "deployment failed: hook execution failure(s) detected" suggests there might be issues with the lifecycle hooks configuration.
This behavior is likely occurring because the blue/green deployment strategy uses specific lifecycle hooks and deployment controller configurations that need to be properly addressed when switching back to a rolling deployment. The blue/green deployment strategy in Amazon ECS is designed to run two identical production environments and validate new service revisions before directing production traffic to them, which requires different configuration than a rolling deployment.
When you attempt to switch back to a ROLLING strategy, the service might still be referencing lifecycle hooks or other blue/green specific configurations that aren't compatible with the rolling deployment model, causing the deployment to fail.
To resolve this issue, you might need to:
- Ensure all lifecycle hooks are properly removed or reconfigured when switching back to a rolling deployment
- Consider creating a new service with the desired deployment strategy rather than updating an existing one
- Check if there are any lingering resources from the blue/green deployment that might be causing conflicts (such as target groups or load balancer configurations)
Since this appears to be a relatively new feature (based on your reference to a recent blog post), it's possible that there are still some limitations or bugs in the transition between deployment strategies that AWS may need to address.
Sources
Amazon ECS enables built-in blue/green deployments - AWS
Amazon ECS blue/green deployments - Amazon Elastic Container Service
Amazon ECS service deployment controllers and strategies - Amazon Elastic Container Service
For anyone that stumbles upon the same problem, I can confirm AWS has resolved this issue.
Relevant content
- asked 2 years ago
- asked 2 years ago

According to this document it should be possible to migrate from ECS Blue/green to rolling.