From c4bb5aa28f34b6ac97c0cec1165754ebd04402e3 Mon Sep 17 00:00:00 2001 From: Eugenio Sales Date: Fri, 14 Oct 2022 20:02:16 -0300 Subject: [PATCH] feature #1 - Add serverless framework inital setup --- serverless.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 serverless.yml diff --git a/serverless.yml b/serverless.yml new file mode 100644 index 0000000..4f86d83 --- /dev/null +++ b/serverless.yml @@ -0,0 +1,39 @@ +service: sbf +frameworkVersion: ">=1.50.0 <2.0.0" +provider: + name: aws + runtime: nodejs12.x + timeout: 30 + memorySize: 512 + stage: ${opt:stage, 'dev'} + region: us-east-1 + useDotenv: true + iamRoleStatements: + - Effect: Allow + Action: + - dynamodb:DescribeTable + - dynamodb:Query + - dynamodb:GetItem + - dynamodb:PutItem + - dynamodb:UpdateItem + - dynamodb:DeleteItem + - dynamodb:BatchWriteItem + - dynamodb:CreateTable + - dynamodb:DescribeStream + - dynamodb:GetRecords + - dynamodb:GetShardIterator + - dynamodb:ListStreams + - dynamodb:Scan + Resource: arn:aws:dynamodb:#{AWS::Region}:#{AWS::AccountId}:table/* + environment: + STAGE: ${self:provider.stage} + +plugins: + - serverless-plugin-typescript + - serverless-offline + - serverless-dotenv-plugin + +custom: + funcDir: src/4-framework/functions + baseApi: sbf/v1 + baseApiInternal: api/v1