-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
64 lines (60 loc) · 1.56 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
63
64
service: StepFunctionsDemoBlog
custom:
stage: blog
tableName: StepFunctionDemoDynamoDB
tableThroughputs:
prod: 5
default: 1
tableThroughput: ${self:custom.tableThroughputs.${self:custom.stage}, self:custom.tableThroughputs.default}
provider:
name: aws
runtime: python3.6
region: eu-west-2
memorySize: 1024 # optional, in MB, default is 1024
timeout: 6 # optional, in seconds, default is 6
profile: default
iamRoleStatements:
- Effect: Allow
Action:
- logs:*
Resource: [
"*"
]
- Effect: Allow
Action:
- dynamodb:*
Resource: [
"*"
]
functions:
seed-dynamodb-blog-function:
name: seed-dynamodb-blog-function
handler: seed_dynamodb.seed_dynamodb_handler
timeout: 60
get-all-users:
name: get_all_users
handler: get_all_users.get_all_users
validate-name:
name: validate_name
handler: validate_name.validate_name
validate-social-security:
name: validate_social_security
handler: validate_social_security.validate_ss
send-email:
name: send_email
handler: send_email.send_email
resources:
Resources:
StepFunctionDemoDynamoDB:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.tableName}
AttributeDefinitions:
- AttributeName: userId
AttributeType: S
KeySchema:
- AttributeName: userId
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: ${self:custom.tableThroughput}
WriteCapacityUnits: ${self:custom.tableThroughput}