-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathserverless.yml
More file actions
41 lines (36 loc) · 992 Bytes
/
Copy pathserverless.yml
File metadata and controls
41 lines (36 loc) · 992 Bytes
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
service: aws-apply-berin
provider:
name: aws
runtime: nodejs8.10
environment:
DYNAMODB_TABLE: ${self:service}-${self:provider.stage}-apartment
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:UpdateItem
Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/${self:provider.environment.DYNAMODB_TABLE}"
plugins:
- serverless-offline
functions:
post:
handler: handler.post
timeout: 300
events:
- http: GET post
- schedule: rate(5 minutes)
resources:
Resources:
NicknamesTable:
Type: 'AWS::DynamoDB::Table'
Properties:
AttributeDefinitions:
- AttributeName: apartmentID
AttributeType: S
KeySchema:
- AttributeName: apartmentID
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: ${self:provider.environment.DYNAMODB_TABLE}