-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
45 lines (42 loc) · 1019 Bytes
/
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
org: lululemon
app: zephyr
service: zephyr
frameworkVersion: '3'
provider:
name: aws
runtime: python3.8
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource:
- Fn::GetAtt: [ TransactionsTable, Arn ]
functions:
record_transaction:
handler: handler.record_transaction
events:
- httpApi:
path: /record_transaction
method: post
resources:
Resources:
TransactionsTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: transactionId
AttributeType: S
KeySchema:
- AttributeName: transactionId
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: Transactions