Troubleshooting - Dynamic Image Transformation for Amazon CloudFront

Troubleshooting

Contact AWS Support

If you have AWS Developer Support, AWS Business Support, or AWS Enterprise Support, you can use the Support Center to get expert assistance with this solution. The following sections provide instructions.

Create case

  1. Sign in to Support Center.

  2. Choose Create case.

How can we help?

  1. Choose Technical.

  2. For Service, select Solutions.

  3. For Category, select Other Solutions.

  4. For Severity, select the option that best matches your use case.

  5. When you enter the Service, Category, and Severity, the interface populates links to common troubleshooting questions. If you can’t resolve your question with these links, choose Next step: Additional information.

Additional information

  1. For Subject, enter text summarizing your question or issue.

  2. For Description, describe the issue in detail.

  3. Choose Attach files.

  4. Attach the information that AWS Support needs to process the request.

Help us resolve your case faster

  1. Enter the requested information.

  2. Choose Next step: Solve now or contact us.

Solve now or contact us

  1. Review the Solve now solutions.

  2. If you can’t resolve your issue with these solutions, choose Contact us, enter the requested information, and choose Submit.

Seeing cached images even after making configuration changes on Admin UI

Problem: Images continue to show previous transformations even after updating origins, policies, or mappings through the Admin UI.

Cause: CloudFront caches processed images based on the request URL and headers. Configuration changes don’t automatically invalidate existing cached images.

Solution: Create a CloudFront invalidation to clear cached images:

  1. Navigate to the CloudFront console

  2. Select the distribution created by the solution

  3. Go to the Invalidations tab

  4. Click Create invalidation

  5. Enter the path pattern for images to invalidate:

    • For all images: /*

    • For specific paths: /images/ or /mobile/

  6. Click Create invalidation

The invalidation will clear cached images, forcing CloudFront to request fresh images with the new configuration applied.

Enable debug logs

Problem: Need detailed logging information for troubleshooting image processing issues.

Solution: Debug logs are not enabled by default. To enable debug logging:

  1. Navigate to the AWS Lambda console

  2. Find the image processing Lambda function created by the solution

  3. Go to the Configuration tab

  4. Select Environment variables

  5. Add or modify the debug logging environment variables (exact variable names can be found in the CDK construct)

  6. Save the changes

Debug logs will provide detailed information about image processing operations, transformation steps, and error details to help with troubleshooting.

Tracing API errors using request ID

Problem: Need to identify the root cause of API errors or failed image processing requests.

Solution: Each API response includes an x-amz-request-id header that can be used to trace the request in CloudWatch logs:

  1. Capture the x-amz-request-id from the API response headers

  2. Navigate to the CloudWatch console

  3. Go to Log groups

  4. Find the log group for the image processing service:

    • Lambda architecture: Look for the Lambda function log group

    • ECS architecture: Look for the ECS task log group

  5. Search for the request ID in the logs:

    • Use the CloudWatch Logs Insights query: fields @timestamp, @message | filter @message like /REQUEST_ID/

    • Replace REQUEST_ID with the actual request ID value

  6. Review the log entries to identify error messages, stack traces, or processing details

The request ID allows you to trace the complete request lifecycle and identify exactly where errors occurred during image processing.