Create serverless.yml
This commit is contained in:
24
serverless.yml
Normal file
24
serverless.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# serverless.yml
|
||||||
|
|
||||||
|
#组件信息
|
||||||
|
component: scf # (必选) 组件名称,在该实例中为scf
|
||||||
|
name: jdscript # (必选) 组件实例名称。
|
||||||
|
|
||||||
|
#组件参数配置
|
||||||
|
inputs:
|
||||||
|
name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app}
|
||||||
|
enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可
|
||||||
|
src: ./
|
||||||
|
handler: index.main_handler #入口
|
||||||
|
runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15
|
||||||
|
region: ap-guangzhou # 函数所在区域
|
||||||
|
description: This is a function in ${app} application.
|
||||||
|
memorySize: 64 # 内存大小,单位MB
|
||||||
|
timeout: 900 # 超时时间,单位秒
|
||||||
|
events: # 触发器
|
||||||
|
- timer: # 定时触发器
|
||||||
|
parameters:
|
||||||
|
# name: timer # 触发器名称,默认timer-${name}-${stage}
|
||||||
|
cronExpression: "0 0 0 */1 * * *" # 每天零点执行一次
|
||||||
|
enable: true
|
||||||
|
argument: argument # 额外的参数
|
Reference in New Issue
Block a user