-
Notifications
You must be signed in to change notification settings - Fork 12
Add lambda at edge support #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lambda at edge support #2
Conversation
eahefnawy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @danielcondemarin ... I've added some comments
| /sample/path: | ||
| ttl: 10 | ||
| lambda@edge: | ||
| viewer-request: arn:aws:lambda:us-east-1:123:function:myFunc:version # lambda ARN including version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the version a strict requirement for Lambda@Edge? I don't think we support versioning in our lambda component 🤔 ... In that case, this component wouldn't be composable with a lambda/function component cause they output a simple versionless ARN.
This effectively means that users of this component could only use it with an already deployed lambda via another tool, which kinda defeats the purpose of the whole thing. What you think? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it must be the ARN of a function version and $LATEST can't be used either. How difficult would it be to add versioning onto the aws-lambda component? Or maybe a higher level component that uses aws-lambda but also manages versioning?
…lambda-at-edge-support Add lambda at edge support
Adds support for CloudFront lambda event triggers:
For example:
Event types supported:
viewer-request|origin-request|viewer-response|origin-responsehttps://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-cloudfront-trigger-events.html
In future you may want to consider provisioning the Lambda as part of the
aws-cloudfrontcomponent. That could be another iteration of the API, for example by setting an object rather than the ARN string: