如何解决如何在不丢失登录用户的情况下更新我的 Cognito 用户池?
我正在尝试从以下位置更新我的 Cognito 用户池:
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
# Makes sure to delete the resource when the stack is deleted
DeletionPolicy: Delete
Properties:
# Generate a name based on the stage
UserPoolName: ${self:custom.cognito.user-pool}
# Set email as an alias
UsernameAttributes:
- email
AutoVerifiedAttributes:
- email
到:
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
# Makes sure to delete the resource when the stack is deleted
DeletionPolicy: Delete
Properties:
# Generate a name based on the stage
UserPoolName: ${self:custom.cognito.user-pool}
# Set username as an alias
AliasAttributes:
- preferred_username
AutoVerifiedAttributes:
- email
尝试部署时,我收到以下错误消息:
An error occurred: CognitoUserPool - Updates are not allowed for property - AliasAttributes. (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: null; Proxy: null).
我想我可能需要删除我的池并从头开始重新创建它,但我不知道如何留住我的用户。
我该怎么做?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。