【发布时间】:2018-01-18 15:46:42
【问题描述】:
我正在使用无服务器框架,我需要为 Lambda 函数创建的 UserPool 覆盖一些默认值。正确的方法是什么?
我的serverless.yml 正在创建两个user-pool(同名),一个用于lambda 函数,另一个用于UserPool 资源:
service: userpool
custom:
stage: dev
poolName: user-pool
provider:
name: aws
runtime: nodejs6.10
stage: ${opt:stage, self:custom.stage}
functions:
preSignUp:
handler: handler.preSignUp
events:
- cognitoUserPool:
pool: ${self:custom.poolName}
trigger: PreSignUp
resources:
Resources:
UserPool:
Type: "AWS::Cognito::UserPool"
Properties:
UserPoolName: ${self:custom.poolName}
AliasAttributes:
- email
AutoVerifiedAttributes:
- email
Schema:
- Name: name
AttributeDataType: String
Mutable: true
Required: true
- Name: email
AttributeDataType: String
Mutable: false
Required: true
【问题讨论】:
标签: amazon-web-services lambda amazon-cognito serverless-framework