将属性添加到池时发生错误。现有属性已具有名称custom:property

时间:2019-02-04 12:20:25

标签: amazon-cognito serverless-framework

我正在使用此无服务器认知添加自定义属性插件来结合无服务器框架设置认知用户池。 替换serverless.yml中的用户池配置后,出现此错误:

Serverless: CognitoAddCustomAttributesPlugin: Start
Serverless: CognitoAddCustomAttributesPlugin: Found userPoolId: xxxxx
Serverless: CognitoAddCustomAttributesPlugin: Found userPoolClientId: xxxxx
Serverless: CognitoAddCustomAttributesPlugin: Adding 1 attribute(s) to pool: custom:name
Serverless: CognitoAddCustomAttributesPlugin: Error occurred when adding attributes to pool. CognitoAddCustomAttributesPluginError: custom:custom:name: Existing attribute already has name custom:custom:name.

上面提到的用户池存在于aws控制台中,我可以使用以下代码行在终端中获取它:

aws cognito-idp describe-user-pool --user-pool-id xxxx

并发现它实际上具有上述属性。

看一下源代码,我看到这个框架正在过滤来自现有用户池的结果,并且仅当现有属性与serverless.yml上的属性不匹配时才添加新属性,但我不明白这是怎么回事我的文件以及如何进行这项工作。

你能帮我吗?

谢谢。

0 个答案:

没有答案