-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
59 lines (53 loc) · 1.46 KB
/
serverless.yml
File metadata and controls
59 lines (53 loc) · 1.46 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
58
59
# Welcome to serverless. Read the docs
# https://serverless.com/framework/docs/
# Serverless.yml is the configuration the CLI
# uses to deploy your code to your provider of choice
# The `service` block is the name of the service
service: test-api
# The `provider` block defines where your service will be deployed
provider:
name: aws
runtime: python3.6
memorySize: 1024 # optional, default is 1024
timeout: 300 # optional, default is 6
profile: jun-dev
role: arn:aws:iam::#######################
stage: ${opt:stage, 'dev'} # 커맨드 라인에서 스테이지 명시 안하면 dev으로 처리한다.
region: ap-northeast-2
versionFunctions: false
environment:
TZ: Asiz/Seoul
serviceType: ${self:provider.stage}
vpc:
securityGroupIds:
- sg-####################
subnetIds:
- subnet-##################
# you can add packaging information here
package:
individually: true
exclude:
- '**'
# The `functions` block defines what code to deploy
functions:
hello_world_api:
memorySize: 1024
handler: hello_world_api.run
events:
- http:
path: hello_world_api
method: post
cors: true
private: true
package:
include:
- hello_world_api.py
hello_world_cron:
handler: hello_world_cron.run
events:
- schedule:
rate: cron(*/5 * * * ? *) # 5분마다 실행
enabled: true
package:
include:
- hello_world_cron.py