【发布时间】:2020-07-08 15:22:02
【问题描述】:
当我使用 IdentityId 和 Logins 调用 GetCredentialsForIdentity 时出现 ResourceNotFoundException
client_identify = boto3.client('cognito-identity', region_name=POOL_REGION)
logins = {}
logins[
"cognito-idp." + POOL_REGION + ".amazonaws.com/" + USER_POOL
] = id_token;
print(logins, IDENTITY_POOL_ID)
res = client_identify.get_credentials_for_identity(
IdentityId=IDENTITY_POOL_ID,
Logins=logins
)
我在这里遇到的错误是: botocore.errorfactory.ResourceNotFoundException:发生错误 (ResourceNotFoundException) 调用 GetCredentialsForIdentity 操作时:Identity 在此处输入代码'ap-south-1:asdfadsfasdfsdafdsadfasdfasd'
当我尝试使用 javascript 时,它工作得非常好。
python有什么解决办法吗?
【问题讨论】:
-
你确定你指定的
IDENTITY_POOL是正确的吗? -
是的。我正在使用 IDENTITY_POOL_ID
-
但是代码中没有
IDENTITY_POOL_ID。取而代之的是IDENTITY_POOL或POOL_ID?这些都不一样? -
我有更新问题请查收。
-
我正在关注这个boto3.amazonaws.com/v1/documentation/api/latest/reference/…来实现。他们在这里提到了“IdentityId”,但我提供的是“IDENTITY_POOL_ID”。
标签: python amazon-web-services boto3