Skip to content

Commit 50f405d

Browse files
authored
Add environment variable for table name
Allow dynamic table name access from within the code.
1 parent b01c76a commit 50f405d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aws-node-rest-api-with-dynamodb/serverless.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ frameworkVersion: ">=1.1.0 <2.0.0"
55
provider:
66
name: aws
77
runtime: nodejs4.3
8+
environment:
9+
DYNAMODB_TABLE: ${self:service}-${opt:stage, self:provider.stage}
810
iamRoleStatements:
911
- Effect: Allow
1012
Action:

0 commit comments

Comments
 (0)