【发布时间】:2019-12-30 00:29:25
【问题描述】:
在我的 AWS CloudFormation 堆栈中,我想将角色附加到 Cognito 身份池(有效),对于身份验证提供程序 > Cognito > Authenticated 角色选择,使用 CloudFormation 语法选择“从令牌中选择角色”(这不会工作),如下:
wzjCognitoIdentityPoolRoles:
Type: AWS::Cognito::IdentityPoolRoleAttachment
Properties:
IdentityPoolId:
Ref: wzjCognitoIdentityPool
Roles:
authenticated:
Fn::GetAtt: [cognitoAuthRoleWithIdentity, Arn]
unauthenticated:
Fn::GetAtt: [cognitoAuthRoleNoIdentity, Arn]
RoleMappings:
Type: Token
AmbiguousRoleResolution: AuthenticatedRole
部署时出现以下错误:
An error occurred: wzjCognitoIdentityPoolRoles - Property validation failure: [Value of property {/RoleMappings/Type} does not match type {Object}, Value of property {/RoleMappings/AmbiguousRoleResolution} does not match type {Object}].
但据我了解AWS CloudFormation documentation,我认为我使用了正确的语法。
我该如何解决这个问题?
感谢您的帮助。
【问题讨论】:
标签: amazon-web-services amazon-cloudformation amazon-cognito