-
Notifications
You must be signed in to change notification settings - Fork 154
feat: publish lib as Lambda Layer #1095
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
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.
Great work Florian, thank you fro this PR.
I've left only a couple of minor comments but it's already looking good.
docs/index.md
Outdated
BuildMethod: esbuild | ||
BuildProperties: | ||
Minify: true | ||
External:s |
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 this s
in External:s
(<- this) on purpose? If yes please resolve this 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.
oups , well catched
Docker dependency might be an overkill, thinking about moving to a simple zip bundling:
|
@@ -150,6 +150,41 @@ sam logs -n getAllItemsFunction --stack-name powertools-example --tail | |||
|
|||
You can find more information and examples about filtering Lambda function logs in the [SAM CLI Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-logging.html). | |||
|
|||
## Switch to Lambda Layer | |||
|
|||
This example bundle all your dependencies in a single JS file thanks to esbuild but you can switch the AWSLambdaPowertoolsTypeScript Layer by: |
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.
This example bundle all your dependencies in a single JS file thanks to esbuild but you can switch the AWSLambdaPowertoolsTypeScript Layer by: | |
This example bundles all your dependencies in a single JS file with `esbuild`. You can switch the `AWSLambdaPowertoolsTypeScript` Layer by: |
@awslabs/aws-lambda-powertools-typescript No related issues found. Please ensure 'pending-release' label is applied before releasing. |
Description of your changes
How to verify this change
Release process: https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/2826141922
A public version is already available under this ARN:
arn:aws:lambda:{REGION}:094274105915:layer:AWSLambdaPowertoolsTypeScript:1
that was published during1.0.2
release. So can be used in any deployment. An example of its usage is available in our CDK examples and be deploy simply:Get to your AWS Console lambda , select the Lambda called
MyLayeredFunction
and check it's code and execution.E2E tests has been added in the layer publisher as well.
Related issues, RFCs
#826
PR status
Is this ready for review?: NO
Is it a breaking change?: NO
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.