私はserverlessフレームワークを使用しており、Lambda関数で作成されたUserPoolのデフォルト値をオーバーライドする必要があります。それを行う正しい方法は何ですか?Lamda関数とリソースで同じCognito 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
スタック全体とすべてのユーザープール(CFが自動的にそれらを削除するとは思わない)を削除して再配置して、動作するようにしてください。 –