-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
58 lines (50 loc) · 1.45 KB
/
Copy pathserverless.yml
File metadata and controls
58 lines (50 loc) · 1.45 KB
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
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
#
# Happy Coding!
service: ec2-lambda-api
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
provider:
name: aws
runtime: python2.7
region: us-east-2
profile: serverless-demo
memorySize: 128
vpc:
securityGroupIds:
- sg-02f36969
subnetIds:
- subnet-6bb04c11
- subnet-2a67e242
- subnet-bf7b51f2
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:*"
Resource: "*"
#you can define service wide environment variables here
environment:
TAG_KEY: "testServerType"
TAG_VALUE: "testWorker"
REGION: "us-east-2"
ENV_TYPE: "ec2"
SERVER_NAME: "ec2-52-14-55-216.us-east-2.compute.amazonaws.com"
PORT: "5000"
API_LOC: "/api/test/getCount"
TOKEN: "eyJhbGciOiJIUzI1NiIsImV4cCI6MTUyMDMwMjk1NCwiaWF0IjoxNTIwMzAyMzU0fQ.eyJpZCI6NH0.nGqc76NU8nZ21l4oKgmkEdhFWSX0GDJ6SfyuA_XmF6g"
functions:
get-count:
handler: handler.main
timeout: 90
events:
- schedule: rate(02 minutes) # run every 02 minutes