Serverless Image Handler
Serverless Image Handler

Appendix A: Backward Compatibility

The updated Serverless Image Handler solution is compatible with legacy image request formats, including the Thumbor and Custom (with rewrite function) formats from previous versions of this solution. If you are using a previous version of this solution and have image requests formatted for use with that version, review the following notes to ensure minimal breaking changes or parities.

Note

Legacy requests (Thumbor and Custom) are limited to sourcing original images from the first bucket only in the SOURCE_BUCKETS environment variable. You can adjust this in the environment variables section of your image handler AWS Lambda function. For example:

SOURCE_BUCKETS: “my-bucket-001, my-bucket-002, my-bucket-003”

Thumbor

Thumbor image requests can be specified as normal, with filters and other relevant properties added on as suffixes to the default CloudFront ApiEndpoint. For example:

https://<distName>.cloudfront.net/filters:grayscale()/image.png

Custom

Custom image requests that used the previous solution versions rewrite feature can also be specified as normal. Note that the REWRITE_MATCH_PATTERN and REWRITE_SUBSTITUTION environment variables for your image handler function must be updated with the appropriate (JavaScript/ECMAScript-compatible) regular expressions and strings.

https://<distName>.cloudfront.net/<customRequestHere>

On this page: