如何使用自定义映射cloudform cognito用户池身份验证提供程序



我已经成功地云化了一个cognito标识池,但我看不到如何将自定义映射添加到"Cognito"认证提供者";形成云层。

在控制台上的Cognito Authentication Provider中,有一个下拉列表,我必须手动选择";使用自定义映射";然后我可以手动将映射添加到我的自定义用户属性中。然而,我需要能够将其云化,并且正在努力为其找到正确的位置。

与该标识池一起使用的用户池具有";SupportedIdentityProviders";设置为";COGNITO";

更新

我可以通过运行。。。

aws cognito-identity list-identities --max-results 2 --identity-pool-id xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx

这会把还给我

{
"IdentityPoolId": "xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"Identities": [
{
"IdentityId": "yy-yyyy-y:yyyyyyyy-yyyy-yyyy-yyyyyyyyyy",
"Logins": [
"cognito-idp.eu-west-2.amazonaws.com/eu-west-2_tFT6FBwIO"
],
"CreationDate": "2021-11-15T12:38:48.249000+00:00",
"LastModifiedDate": "2021-11-15T12:38:48.263000+00:00"
}
]
}

使用";登录";我现在可以运行的信息。。。

aws cognito-identity get-principal-tag-attribute-map --identity-pool-id xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx --identity-provider-name "cognito-idp.eu-west-2.amazonaws.com/eu-west-2_tFT6FBwIO"

返回

{
"IdentityPoolId": "xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"IdentityProviderName": "cognito-idp.eu-west-2.amazonaws.com/eu-west-2_tFT6FBwIO",
"UseDefaults": false,
"PrincipalTags": {
"attr_x": "custom:attr_x",
"attr_y": "custom:attr_y",
"attr_z": "custom:attr_z"
}
}

然而,我仍然不知道如何通过云形成来设置这个映射。。。

问候做记号

CloudFormation中还不支持设置PrincipalTag属性映射,但根据CloudFormation路线图,很快就会支持。同时,您必须创建一个CloudFormation自定义资源或资源提供程序才能实现这一点。

最新更新