From c9828c1bd7f5bd2ce301eaed3f8529fcb7916677 Mon Sep 17 00:00:00 2001 From: William Bruno Date: Sun, 4 Jun 2023 15:17:11 -0300 Subject: [PATCH] feat: add sls prd file --- capitulo_5/5.9.2/resources/serverless.prd.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 capitulo_5/5.9.2/resources/serverless.prd.yml diff --git a/capitulo_5/5.9.2/resources/serverless.prd.yml b/capitulo_5/5.9.2/resources/serverless.prd.yml new file mode 100644 index 0000000..cf690f7 --- /dev/null +++ b/capitulo_5/5.9.2/resources/serverless.prd.yml @@ -0,0 +1,26 @@ +provider: + iam: + role: + name: serverless-${self:service}-${self:provider.stage}-role + managedPolicies: + - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + statements: + - Effect: 'Allow' + Action: + - 'dynamodb:Scan' + - 'dynamodb:Query' + - 'dynamodb:GetItem' + - 'dynamodb:PutItem' + - 'dynamodb:DeleteItem' + Resource: + - 'arn:aws:dynamodb:${self:provider.region}:123:table/Shortener' + - 'arn:aws:dynamodb:${self:provider.region}:123:table/Shortener/index/*' +resources: + Resources: +apiGateway: + apiKeys: + - name: ${self:service}-prd + description: api key para o lambda de prod +environment: + AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1 + NODE_ENV: production \ No newline at end of file