-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathserverless.yml
67 lines (62 loc) · 1.63 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
65
66
67
service: dont-crypto
provider:
name: aws
runtime: haskell
functions:
dont-crypto-func:
handler: dont-crypto.dont-crypto-exe
events:
- http:
path: getrejected
method: get
authorizer:
name: dONT-auth
type: request
- http:
path: getstuff
method: get
dONT-auth:
handler: dont-crypto.dont-auth
events:
- http:
path: getauth
method: get # with a path of the form `dir1/.../dirn`, relative to `serverless.yml`,
# which points to the location where the Haskell package `mypackage` is
# defined. This prefix is not needed when the Stack project is defined at
# the same level as `serverless.yml`.
plugins:
- serverless-haskell
- serverless-offline
custom:
haskell:
docker: DOCKER
resources:
Resources:
DynamoDbTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Dont
AttributeDefinitions:
- AttributeName: id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
DynamoDBIamPolicy:
Type: AWS::IAM::Policy
DependsOn: DynamoDbTable
Properties:
PolicyName: lambda-dynamodb
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
Resource: arn:aws:dynamodb:us-east-2:066707434473:table/Dont
Roles:
- Ref: IamRoleLambdaExecution