/
template.yml
63 lines (60 loc) · 1.42 KB
/
template.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
---
AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::Serverless-2016-10-31
- AWS::CodeStar
Parameters:
ProjectId:
Type: String
Description: CodeStar projectId used to associate new resources to team members
Resources:
TrafficData:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: python3.6
Timeout: 15
CodeUri: ./
VpcConfig:
SecurityGroupIds:
- sg-2d222258
SubnetIds:
- subnet-1a09626c
- subnet-c8266490
- subnet-3980ae04
- subnet-9c5315b6
Policies:
- AWSLambdaBasicExecutionRole
- AWSLambdaVPCAccessExecutionRole
- AmazonSSMReadOnlyAccess
Events:
PostEvent:
Type: Api
Properties:
Path: /
Method: post
TrafficStats:
Type: AWS::Serverless::Function
Properties:
Handler: stats.handler
Runtime: python3.6
Timeout: 15
CodeUri: ./
VpcConfig:
SecurityGroupIds:
- sg-2d222258
SubnetIds:
- subnet-1a09626c
- subnet-c8266490
- subnet-3980ae04
- subnet-9c5315b6
Policies:
- AWSLambdaBasicExecutionRole
- AWSLambdaVPCAccessExecutionRole
- AmazonSSMReadOnlyAccess
Events:
PostEvent:
Type: Api
Properties:
Path: /stats
Method: post