-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
62 lines (56 loc) · 1.61 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
service: mymangalist
frameworkVersion: '2'
useDotenv: true
plugins:
- serverless-python-requirements
- serverless-offline
custom:
pythonRequirements: # DO NOT REMOVE THIS, THIS HELP US TO AVOID PYTHON VERSION ERRORS
pythonBin: python3
dynamodbItemsTableName: ${self:service}_${self:provider.stage}_items
provider:
name: aws
runtime: python3.8
lambdaHashingVersion: 20201221
stage: ${opt:stage, 'dev'}
region: us-east-1
logRetentionInDays: 5
deploymentBucket: my-serverless-bucket-deployment
apiGateway:
apiKeys:
- name: ${self:provider.stage}-malaquias
value: ${env:GATEWAY_X_API_KEY} # you can hide it in a serverless variable and must be unique
description: My personal api key
usagePlan:
# quota:
#limit: 5000
#offset: 2
#period: month
throttle:
rateLimit: 50
burstLimit: 100
tags:
project: ${self:service}
iam:
role:
statements:
- Effect: Allow
Action:
- s3:*
- cloudwatch:*
- dynamodb:*
Resource: "*"
environment:
DYNAMODB_ITEMS_TABLE_NAME: ${self:custom.dynamodbItemsTableName}
package:
individually: true
functions:
- ${file(src/functions/createnewitem/function.yml)}
- ${file(src/functions/listmyitems/function.yml)}
- ${file(src/functions/listmyscores/function.yml)}
- ${file(src/functions/addnewscore/function.yml)}
- ${file(src/functions/updateitemstatus/function.yml)}
- ${file(src/functions/searchby/function.yml)}
resources:
- ${file(resources/api-gateway.yml)}
- ${file(resources/dynamodb-items-table.yml)}