forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lambda-layers): add AWS SDK JS layer
Add a new package `@aws-cdk/lambda-layers` that offers pre-built layers. Layer building is currently only supported for Node.js and works as follows: * List static members of the `Layer` class (= layers to build) * Create a dummy `package.json` file containing only dependencies for this layer in the `layers` folder. Dependencies versions are extracted from the `package.json` of `@aws-cdk/lambda-layers`. * Run `npm install` As layer dependencies are extracted from the main `package.json` they can be picked up by `dependabot`, automatically updating the layer when needed. The `getLayerVersion()` method returns a singleton `lambda.LayerVersion` that can be used in Lambda functions. The first layer is `AWS_SDK_JS` which offers a more recent version of the AWS SDK than the one included in the Lambda runtime (it will also be updated more frequently). Use the `AWS_SDK_JS` layer in `AwsCustomResource` and `AwsApi` event target. Closes aws#2689 Closes aws#5063
- Loading branch information
Showing
18 changed files
with
863 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
*.js | ||
*.js.map | ||
*.d.ts | ||
node_modules | ||
dist | ||
tsconfig.json | ||
tslint.json | ||
.jsii | ||
|
||
.LAST_BUILD | ||
.LAST_PACKAGE | ||
*.snk | ||
.nyc_output | ||
coverage | ||
.nycrc | ||
|
||
layers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Don't include original .ts files when doing `npm pack` | ||
*.ts | ||
!*.d.ts | ||
coverage | ||
.nyc_output | ||
*.tgz | ||
|
||
dist | ||
.LAST_PACKAGE | ||
.LAST_BUILD | ||
!*.js | ||
|
||
# Include .jsii | ||
!.jsii | ||
|
||
*.snk | ||
|
||
*.tsbuildinfo |
Oops, something went wrong.