我正在尝试使用Go语言通过Lambda函数创建Cognito用户池。
IAM角色、IAM策略和信任关系策略已经成功创建。
但是当我尝试创建Cognito池时,出现了错误:
InvalidSmsRoleTrustRelationshipException: 角色没有信任关系允许Cognito扮演该角色。
信任关系策略如下:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "cognito-idp.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
创建用户池的API调用如下 -
newUserPoolData := &cognitoidentityprovider.CreateUserPoolInput{
PoolName: aws.String(poolName),
Policies: &userPoolPolicyType,
AutoVerifiedAttributes: autoVerifiedAttributes,
UsernameAttributes: userNameAttributes,
SmsConfiguration: &smsConfingType,
}
这里我有所疏漏吗?
{External ID}
是什么?在哪里创建或查找它? - lazzy_ms