Day 21 - Task execution fails with ImportError: cannot import name 'url_quote' from 'werkzeug.urls'
Author: mrtejas99Created Jun 19, 2026Updated Jun 19, 2026
When i create a task definition in ECS and using the image build using the Dockerfile provided for week-21, i notice that the task initialization fails for the provided task definition.
On inspection of Task initialization logs on CloudWatch, I have noticed that the following error
ImportError: cannot import name 'url_quote' from 'werkzeug.urls'
Steps to reproduce
- Build the image from the Dockerfile provided for week-21
- Tag the image, upload to ECR
- Create a Task definition for ECS, use the image created above
- Run the created task in the cluster
- Observe that the Task execution fails with the error mentioned in the issue created
Source: iam-veeramalla/aws-devops-zero-to-hero