diff --git a/README.md b/README.md index 9e02c7d..21c300e 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ This plugin currently supports the following AWS runtimes: * nodejs6.10 * nodejs8.10 +* nodejs10.x * python2.7 * python3.6 * python3.7 diff --git a/example/serverless.yml b/example/serverless.yml index e43481b..fd415c2 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -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: diff --git a/latest-layers.sh b/latest-layers.sh index 15e12a5..be22af5 100755 --- a/latest-layers.sh +++ b/latest-layers.sh @@ -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") diff --git a/package.json b/package.json index 361d429..a869101 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/index.ts b/src/index.ts index b504bc1..8a6788f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -91,6 +91,7 @@ export default class IOpipeLayerPlugin { if ( typeof runtime !== "string" || [ + "nodejs10.x", "nodejs6.10", "nodejs8.10", "python2.7", diff --git a/src/layers.ts b/src/layers.ts index 2f42cc8..f14bf82 100644 --- a/src/layers.ts +++ b/src/layers.ts @@ -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":