-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
39 lines (36 loc) · 856 Bytes
/
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
sam-cli-test
Sample SAM Template for sam-cli-test
Globals:
Function:
Runtime: go1.x
Timeout: 5
Environment:
Variables:
DYNAMODB_ENDPOINT: ""
DYNAMODB_TABLE_NAME: !Ref UserDynamoDBTable
Resources:
UserGetFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: build/
Handler: user
Tracing: Active
Policies: AmazonDynamoDBFullAccess
Events:
GetUser:
Type: Api
Properties:
Path: /users/{id}
Method: GET
UserDynamoDBTable:
Type: AWS::Serverless::SimpleTable
Properties:
PrimaryKey:
Name: Id
Type: Number
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2