Resources: UserPool: Type: AWS::Cognito::UserPool Properties: UserPoolName: UserPoolName Policies: PasswordPolicy: MinimumLength: 8 UsernameAttributes: - email Schema: - AttributeDataType: String Name: email Required: false UserAttributeUpdateSettings: AttributesRequireVerificationBeforeUpdate: - email ImplicitApiFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/member_portal.zip Handler: index.gethtml Runtime: nodejs12.x Events: OneTrigger: Type: Cognito Properties: UserPool: Ref: UserPool Trigger: PreSignUp TwoTrigger: Type: Cognito Properties: UserPool: Ref: UserPool Trigger: [PostConfirmation, VerifyAuthChallengeResponse]