【发布时间】:2021-07-26 07:46:18
【问题描述】:
我正在尝试在我的 SAM 应用程序中添加像 here 所述的身份提供者。
当我运行 sam deploy 时,我收到以下错误:
The attribute mapping is missing required attributes [nickname] (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException; Request ID: xy; Proxy: null)
虽然在我的 YAML 定义中,我将属性 nickname 映射如下:
UserPoolIdentityProvider:
Type: AWS::Cognito::UserPoolIdentityProvider
Properties:
AttributeMapping:
given_name: "nickname"
sub: "username"
email: "email"
ProviderDetails:
...
【问题讨论】:
-
您的用户池是否需要昵称?当您进行映射时,请检查您的用户池需要什么以及您的提供者字段是什么。
-
是的,昵称是我的用户池中的必需属性。我检查了提供商的属性。在使用 aws 控制台之前,我实际上测试了整个事情。在那里,我也将 given_name 映射到了昵称并且它起作用了。
标签: amazon-web-services amazon-cloudformation amazon-cognito aws-sam