aws-amplify / aws-amplify/amplify-cli
Ability to put lambda behind CloudFront for reads
- 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
Assessment
This issue has not been assessed yet.