Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Add nodejs10.x Runtime Support
Browse files Browse the repository at this point in the history
Closes #23
  • Loading branch information
kolanos committed Jun 19, 2019
1 parent 196a41a commit 2e73fd9
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 29 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ This plugin currently supports the following AWS runtimes:

* nodejs6.10
* nodejs8.10
* nodejs10.x
* python2.7
* python3.6
* python3.7
Expand Down
9 changes: 9 additions & 0 deletions example/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ functions:
- handler.js
runtime: nodejs8.10

layer-nodejs10:
handler: handler.handler
package:
exclude:
- ./**
include:
- handler.js
runtime: nodejs10.x

layer-python27:
handler: handler.handler
package:
Expand Down
7 changes: 7 additions & 0 deletions latest-layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ REGIONS=(

echo "const layers = {"

echo " \"nodejs10.x\": {"
for region in "${REGIONS[@]}"; do
latest_arn=$(aws --region $region lambda list-layer-versions --layer-name IOpipeNodeJS10 --output text --query "LayerVersions[0].LayerVersionArn")
echo " \"${region}\": \"${latest_arn}\","
done
echo " },"

echo " \"nodejs6.10\": {"
for region in "${REGIONS[@]}"; do
latest_arn=$(aws --region $region lambda list-layer-versions --layer-name IOpipeNodeJS610 --output text --query "LayerVersions[0].LayerVersionArn")
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-iopipe-layers",
"version": "0.2.9",
"version": "0.3.0",
"description": "Serverless plugin to add IOpipe lambda layers.",
"main": "dist/index.js",
"files": [
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default class IOpipeLayerPlugin {
if (
typeof runtime !== "string" ||
[
"nodejs10.x",
"nodejs6.10",
"nodejs8.10",
"python2.7",
Expand Down
79 changes: 51 additions & 28 deletions src/layers.ts
Original file line number Diff line number Diff line change
@@ -1,63 +1,86 @@
const layers = {
"nodejs10.x": {
"ap-northeast-1":
"arn:aws:lambda:ap-northeast-1:146318645305:layer:IOpipeNodeJS10:1",
"ap-northeast-2":
"arn:aws:lambda:ap-northeast-2:146318645305:layer:IOpipeNodeJS10:1",
"ap-south-1":
"arn:aws:lambda:ap-south-1:146318645305:layer:IOpipeNodeJS10:1",
"ap-southeast-1":
"arn:aws:lambda:ap-southeast-1:146318645305:layer:IOpipeNodeJS10:1",
"ap-southeast-2":
"arn:aws:lambda:ap-southeast-2:146318645305:layer:IOpipeNodeJS10:1",
"ca-central-1":
"arn:aws:lambda:ca-central-1:146318645305:layer:IOpipeNodeJS10:1",
"eu-central-1":
"arn:aws:lambda:eu-central-1:146318645305:layer:IOpipeNodeJS10:1",
"eu-west-1": "arn:aws:lambda:eu-west-1:146318645305:layer:IOpipeNodeJS10:1",
"eu-west-2": "arn:aws:lambda:eu-west-2:146318645305:layer:IOpipeNodeJS10:1",
"eu-west-3": "arn:aws:lambda:eu-west-3:146318645305:layer:IOpipeNodeJS10:1",
"us-east-1": "arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS10:1",
"us-east-2": "arn:aws:lambda:us-east-2:146318645305:layer:IOpipeNodeJS10:1",
"us-west-1": "arn:aws:lambda:us-west-1:146318645305:layer:IOpipeNodeJS10:1",
"us-west-2": "arn:aws:lambda:us-west-2:146318645305:layer:IOpipeNodeJS10:1"
},
"nodejs6.10": {
"ap-northeast-1":
"arn:aws:lambda:ap-northeast-1:146318645305:layer:IOpipeNodeJS610:11",
"arn:aws:lambda:ap-northeast-1:146318645305:layer:IOpipeNodeJS610:12",
"ap-northeast-2":
"arn:aws:lambda:ap-northeast-2:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:ap-northeast-2:146318645305:layer:IOpipeNodeJS610:11",
"ap-south-1":
"arn:aws:lambda:ap-south-1:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:ap-south-1:146318645305:layer:IOpipeNodeJS610:11",
"ap-southeast-1":
"arn:aws:lambda:ap-southeast-1:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:ap-southeast-1:146318645305:layer:IOpipeNodeJS610:11",
"ap-southeast-2":
"arn:aws:lambda:ap-southeast-2:146318645305:layer:IOpipeNodeJS610:11",
"arn:aws:lambda:ap-southeast-2:146318645305:layer:IOpipeNodeJS610:12",
"ca-central-1":
"arn:aws:lambda:ca-central-1:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:ca-central-1:146318645305:layer:IOpipeNodeJS610:11",
"eu-central-1":
"arn:aws:lambda:eu-central-1:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:eu-central-1:146318645305:layer:IOpipeNodeJS610:11",
"eu-west-1":
"arn:aws:lambda:eu-west-1:146318645305:layer:IOpipeNodeJS610:11",
"arn:aws:lambda:eu-west-1:146318645305:layer:IOpipeNodeJS610:12",
"eu-west-2":
"arn:aws:lambda:eu-west-2:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:eu-west-2:146318645305:layer:IOpipeNodeJS610:11",
"eu-west-3":
"arn:aws:lambda:eu-west-3:146318645305:layer:IOpipeNodeJS610:10",
"arn:aws:lambda:eu-west-3:146318645305:layer:IOpipeNodeJS610:11",
"us-east-1":
"arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS610:11",
"arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS610:12",
"us-east-2":
"arn:aws:lambda:us-east-2:146318645305:layer:IOpipeNodeJS610:11",
"arn:aws:lambda:us-east-2:146318645305:layer:IOpipeNodeJS610:12",
"us-west-1":
"arn:aws:lambda:us-west-1:146318645305:layer:IOpipeNodeJS610:11",
"arn:aws:lambda:us-west-1:146318645305:layer:IOpipeNodeJS610:12",
"us-west-2":
"arn:aws:lambda:us-west-2:146318645305:layer:IOpipeNodeJS610:11"
"arn:aws:lambda:us-west-2:146318645305:layer:IOpipeNodeJS610:12"
},
"nodejs8.10": {
"ap-northeast-1":
"arn:aws:lambda:ap-northeast-1:146318645305:layer:IOpipeNodeJS810:11",
"arn:aws:lambda:ap-northeast-1:146318645305:layer:IOpipeNodeJS810:12",
"ap-northeast-2":
"arn:aws:lambda:ap-northeast-2:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:ap-northeast-2:146318645305:layer:IOpipeNodeJS810:11",
"ap-south-1":
"arn:aws:lambda:ap-south-1:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:ap-south-1:146318645305:layer:IOpipeNodeJS810:11",
"ap-southeast-1":
"arn:aws:lambda:ap-southeast-1:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:ap-southeast-1:146318645305:layer:IOpipeNodeJS810:11",
"ap-southeast-2":
"arn:aws:lambda:ap-southeast-2:146318645305:layer:IOpipeNodeJS810:11",
"arn:aws:lambda:ap-southeast-2:146318645305:layer:IOpipeNodeJS810:12",
"ca-central-1":
"arn:aws:lambda:ca-central-1:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:ca-central-1:146318645305:layer:IOpipeNodeJS810:11",
"eu-central-1":
"arn:aws:lambda:eu-central-1:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:eu-central-1:146318645305:layer:IOpipeNodeJS810:11",
"eu-west-1":
"arn:aws:lambda:eu-west-1:146318645305:layer:IOpipeNodeJS810:11",
"arn:aws:lambda:eu-west-1:146318645305:layer:IOpipeNodeJS810:12",
"eu-west-2":
"arn:aws:lambda:eu-west-2:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:eu-west-2:146318645305:layer:IOpipeNodeJS810:11",
"eu-west-3":
"arn:aws:lambda:eu-west-3:146318645305:layer:IOpipeNodeJS810:10",
"arn:aws:lambda:eu-west-3:146318645305:layer:IOpipeNodeJS810:11",
"us-east-1":
"arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS810:11",
"arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS810:12",
"us-east-2":
"arn:aws:lambda:us-east-2:146318645305:layer:IOpipeNodeJS810:11",
"arn:aws:lambda:us-east-2:146318645305:layer:IOpipeNodeJS810:12",
"us-west-1":
"arn:aws:lambda:us-west-1:146318645305:layer:IOpipeNodeJS810:11",
"arn:aws:lambda:us-west-1:146318645305:layer:IOpipeNodeJS810:12",
"us-west-2":
"arn:aws:lambda:us-west-2:146318645305:layer:IOpipeNodeJS810:11"
"arn:aws:lambda:us-west-2:146318645305:layer:IOpipeNodeJS810:12"
},
"python2.7": {
"ap-northeast-1":
Expand Down

0 comments on commit 2e73fd9

Please sign in to comment.