I'm using the serverless framework and I need to override some default values for the UserPool created by the Lambda function. What's the correct way to do it?
My serverless.yml is creating two user-pool (same name), one for the lambda function and another for the UserPool resource:
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