我的lambda名称显示为device-service-dev-functionOne
我的serverless.yml如下:
service: device-service
provider:
name: aws
runtime: nodejs10.x
region: us-east-2
logs:
restApi: true
functions:
functionOne:
handler: src/function-one.handler
plugins:
- serverless-pseudo-parameters
- serverless-offline
- serverless-plugin-typescript
如何防止开发人员被包含在device-service-dev-functionOne中?
答案 0 :(得分:2)
您可以在函数定义中指定名称,例如name: my-function
覆盖默认名称。
service: device-service
provider:
name: aws
runtime: nodejs10.x
region: us-east-2
logs:
restApi: true
functions:
functionOne:
name: my-function
handler: src/function-one.handler
plugins:
- serverless-pseudo-parameters
- serverless-offline
- serverless-plugin-typescript