-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathtemplate.yaml
42 lines (41 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
AWSTemplateFormatVersion : "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: Pet Store Rest API Service
Resources:
PetStoreApiGateway:
Type: AWS::Serverless::Api
Properties:
StageName: Prod
DefinitionUri: ./swagger.yaml
PostPetFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: PostPetFunction
Runtime: python3.6
Handler: function.handler
CodeUri: ./lambda/postPet/
Events:
PostPetApi:
Type: Api
Properties:
RestApiId: !Ref "PetStoreApiGateway"
Path: /pet
Method: POST
Policies:
- AWSLambdaBasicExecutionRole
GetPetFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: GetPetFunction
Runtime: python3.6
Handler: function.handler
CodeUri: ./lambda/getPet/
Events:
GetPetApi:
Type: Api
Properties:
RestApiId: !Ref "PetStoreApiGateway"
Path: /pet/{petId}
Method: GET
Policies:
- AWSLambdaBasicExecutionRole