Thursday 1 June 2017

Hosting images on Lambda + API gateway

I got NodeJS application running on AWS Lambda + API gateway environment.

I am deploying my app via serverless app (https://www.npmjs.com/package/serverless). My assets (including images) are packed together to zip format, sent to S3 storage and deployed via cloudfront (regular serverless flow).

Requests to images responses with 200 OK status. The problem is that they are not displaying. I have no idea where should I start to look for an issue.

For example I am trying to display this image: http://www.top13.net/wp-content/uploads/2015/10/perfectly-timed-funny-cat-pictures-5.jpg

Here is URL to it in my app: http://angular-universal-serverless.maciejtreder.com/assets/img/cat.jpg

Is it even possible to display images this way? Maybe I should upload them to S3 storage?



via Maciej Sobala

No comments:

Post a Comment