-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
50 lines (47 loc) · 1.08 KB
/
template.yaml
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
accounts micro-service
Globals:
Function:
Timeout: 5
Tracing: Active
Runtime: go1.x
Environment:
Variables:
REGION: us-east-1
DATABASE_TABLE: !Ref TemplateTable
Api:
TracingEnabled: True
Resources:
Hello:
Type: AWS::Serverless::Function
Properties:
CodeUri: handlers/hello/
Handler: main
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref TemplateTable
Architectures:
- x86_64
Events:
CatchAll:
Type: Api
Properties:
Path: /v1/hello/{name}
Method: GET
TemplateTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: 'template-dev'
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
BillingMode: PAY_PER_REQUEST