From f85d298f83a1850fd838b1b3bb5d3836c274753a Mon Sep 17 00:00:00 2001 From: Eetu Tuomala Date: Fri, 14 Oct 2016 22:17:22 +0300 Subject: [PATCH 1/3] moves aws-sdk from dependencies to devDependencies --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8586d15..c68f3e1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ "author": "", "license": "MIT", "dependencies": { - "aws-sdk": "^2.6.7", "uuid": "^2.0.3" + }, + "devDependencies": { + "aws-sdk": "^2.6.3" } } From 64c73de327e17e22231d610064b7572dfb20d6fe Mon Sep 17 00:00:00 2001 From: Eetu Tuomala Date: Fri, 14 Oct 2016 22:25:28 +0300 Subject: [PATCH 2/3] lambda execution role uses provider.region variable --- serverless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.yml b/serverless.yml index fddde4e..42cc40c 100644 --- a/serverless.yml +++ b/serverless.yml @@ -15,7 +15,7 @@ provider: - dynamodb:PutItem - dynamodb:UpdateItem - dynamodb:DeleteItem - Resource: "arn:aws:dynamodb:us-east-1:*:*" + Resource: arn:aws:dynamodb:${self:provider.region}:*:* functions: create: From 502402b5ccc79b2f15d138174b6a1ace1e42a312 Mon Sep 17 00:00:00 2001 From: Eetu Tuomala Date: Mon, 14 Nov 2016 13:51:42 +0200 Subject: [PATCH 3/3] adds opt.region --- serverless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.yml b/serverless.yml index 42cc40c..d6b75f8 100644 --- a/serverless.yml +++ b/serverless.yml @@ -15,7 +15,7 @@ provider: - dynamodb:PutItem - dynamodb:UpdateItem - dynamodb:DeleteItem - Resource: arn:aws:dynamodb:${self:provider.region}:*:* + Resource: arn:aws:dynamodb:${opt:region, self:provider.region}:*:* functions: create: