DEV Community

Discussion on: A crash course on Serverless with AWS - Image resize on-the-fly with Lambda and S3

Collapse
 
realph profile image
Raphael Essoo-Snowdon • Edited

I'm having a problem triggering the resize function. The 400px x 400px version doesn't yet exist in S3, calling it for the first time should trigger the resize and put the resized image in S3, however the response fails in Chrome Dev Tools when I request it inside an image tag:

However, if I go to that URL (someUrl/400x400/default.jpg) directly in Chrome, the resize function is triggered and the image is added to S3.

Is there any reason why it's failing when used inside an img tag, and why it doesn't kick-off the resize function?

UPDATE: I'm getting an 'ERR_TOO_MANY_REDIRECTS' error. See the image below:

image