This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
66 lines (61 loc) · 1.69 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
service: thermo-proxy
provider:
name: aws
region: eu-west-1
runtime: provided.al2
lambdaHashingVersion: 20201221
versionFunctions: false
tags:
Application: thermo
stackTags:
Application: thermo
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: 'arn:aws:dynamodb:eu-west-1:*:table/thermo'
plugins:
- ./vendor/bref/bref
package:
exclude:
- build/**
- tests/**
- .github/**
functions:
api:
handler: src/App.php
description: 'Thermo proxy'
timeout: 20
layers:
- ${bref:layer.php-74-fpm}
events:
- http: 'POST /peanut/api/v1/peanuts/{mac}/events/'
- http: 'GET /thermo/{mac}/detail'
- http: 'GET /thermo/list'
- http: 'GET /thermo/init'
resources:
Resources:
ThermoTable:
Type: 'AWS::DynamoDB::Table'
Properties:
AttributeDefinitions:
-
AttributeName: mac
AttributeType: S
KeySchema:
-
AttributeName: mac
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: thermo
Tags:
-
Key: Application
Value: thermo