aws-amplify / aws-amplify/amplify-cli

Ability to put lambda behind CloudFront for reads

Open
#2,298 0 comments 7 reactions 1 assignee Claimed by @josefaidt View on GitHub
feature-request hosting p4
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

It would be nice to have the ability to use lambda@edge (ie running read lambda functions from CloudFront). Specifically I'm thinking of caching time consuming lambda queries (image manipulation that is re-used by multiple clients). This could be an option when adding a function.

I see two issues to doing this by manually modifying the templates to make this happen.

1) Hosting is updated before the function is created (so if you add the function and hosting changes together it will always fail)
2) If you create the function, then add the CacheBehaviors/LambdaFunctionAssociations/LambdaFunctionARN it fails because the function does not have a version, and the ARN requires this (AWS:Lambda:Function doesn't create a version, AWS:Serverless:Function potentially does, but haven't been able to get it working)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.