-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add support for Lambda@Edge #6512
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
Conversation
2d13a8b to
35101af
Compare
medikoo
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.
I done more stylistics review (with a lot of nit picks where we can rely on native language features instead of lodash).
Otherwise it looks good, and my guess is that the only thing that is stopping from releasing it, is testing this.
eb49d12 to
4956527
Compare
b1c66f6 to
7dec3a6
Compare
medikoo
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.
Some of tests crash when run individually (exposed by isolated test run)
Good catch. Just pushed a fix... |
60a478c to
6667a96
Compare
…front to getStackinfo test
5d15d41 to
b3506b4
Compare
|
Just did another rebase and fixed the issue where the removal log info is always executed. It's now only shown when the command is Furthermore I did a deep dive into the testing today and could validate that it's working as expected. Shoutouts to @laardee who helped me here and provided https://github.com/laardee/serverless-lambda-at-edge as an example service 🙇 👍 I also updated the PR description to provide a step-by-step walkthrough to validate that this integration works. |
|
FINALLY! 🎉:muscle: |
This is a rebased version of #4796 from @laardee 👍 🥇 🙌
What did you implement:
Closes #3944
Adds support for Lambda@Edge via pure CloudFormation. Thanks again to @laardee who jumped in to work on an initial implementation for this!
How did you implement it:
Compile all the necessary CloudFormation resources (CloudFront / Versioned Lambda function, etc.) to add support for Lambda@Edge.
Todos:
How can we verify it:
Create a new serverless service and replace the
handler.jsandserverless.ymlcode with the following snippets:Deploy the service (this could take a couple of minutes (~10 - 20mins)). After that you can access the CloudFront distribution URL which is printed in your console (you can also use
serverless info). This should open up the Serverless Framework docs page.Inspect the headers (e.g. using this guide if you're running Chrome). You should see the
x-serverless-timeheader which was added by the Lambda@Edge function.Once validated you might want to remove the stack. Note the info message about the necessary manual Lambda@Edge function removals which is logged on the console.
Todos:
Note: Run
npm run test-cito run all validation checks on proposed changesValidate via
npm testValidate via
npm run lint-updatedNote: Some reported issues can be automatically fixed by running
npm run lint:fixValidate via
npm run prettier-check-updatedNote: All reported issues can be automatically fixed by running
npm run prettify-updatedIs this ready for review?: YES
Is it a breaking change?: NO