Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from alexcasalboni/sdk-dependency
Add explicit SDK dependency as Lambda Layer
- Loading branch information
Showing
8 changed files
with
164 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,5 @@ serverless.yml | |
|
||
.idea/ | ||
.vscode/ | ||
|
||
layer-sdk/src |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,11 @@ | ||
{ | ||
"name": "aws-sdk-layer", | ||
"version": "1.0.0", | ||
"description": "A layer used by Lambda functions in this project.", | ||
"author": "Alex Casalboni <alex@alexcasalboni.com>", | ||
"licence": "MIT-0", | ||
"scripts": {}, | ||
"dependencies": { | ||
"aws-sdk": "^2.989.0" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,18 @@ | ||
#!/bin/bash | ||
|
||
# make sure we're working on the layer folder | ||
cd layer-sdk | ||
|
||
# create subfolders | ||
## ./src is referenced by the LayerVersion resource (.gitignored) | ||
## ./src/nodejs will contain the node_modules | ||
mkdir -p ./src/nodejs | ||
|
||
# install layer dependencies (the SDK) | ||
npm i | ||
|
||
# clean up previous build ... | ||
rm -rf ./src/nodejs/node_modules | ||
|
||
# ... and move everything into the layer sub-folder | ||
mv ./node_modules ./src/nodejs |
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