cagataygurturk / image-resizer-service

Serverless image resizing service for AWS
https://serverlessrepo.aws.amazon.com/#/applications/arn:aws:serverlessrepo:us-east-1:526515951862:applications~image-resizer-service
MIT License
101 stars 49 forks source link

Cloudfront -> Api Gateway Setup #37

Open gkodikara opened 2 years ago

gkodikara commented 2 years ago

Hi,

You mention in your README that you advise setting up CDN in front of the API gateway endpoint to improve performance, cost, etc.

Could you advise how you would do this? I've tried pointing to API Gateway and although it works fundamentally, d=xxx querystring details aren't being respected.

climvalencia commented 2 years ago

On CloudFront, check that the Cache and Origin request policies associated with the behavior to handle images are properly passing the query string parameters to the origin. If not, create new policies with the params needed in the allow list.