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

  1. Build the image from the Dockerfile provided for week-21
  2. Tag the image, upload to ECR
  3. Create a Task definition for ECS, use the image created above
  4. Run the created task in the cluster
  5. Observe that the Task execution fails with the error mentioned in the issue created

Source: iam-veeramalla/aws-devops-zero-to-hero