简体   繁体   English

Amazon Cognito身份池区域不存在

[英]Amazon Cognito Identity Pool Region not exist

My identity pool start with "us-east-2...". 我的身份池以“ us-east-2 ...”开头。 but I cannot find US_EAST_2 region in Android Cognito SDK. 但我在Android Cognito SDK中找不到US_EAST_2区域。 Probably region not supported by Amazon. 亚马逊可能不支持该区域。 When I create CognitoCachingCredentialsProvider object : 当我创建CognitoCachingCredentialsProvider对象时:

public static CognitoCachingCredentialsProvider getCredentialsProvider() {

        if (credentialsProvider == null) {
            credentialsProvider = new CognitoCachingCredentialsProvider(
                    context,
                    "us-east-2:*****", // Identity pool ID
                    Regions.DEFAULT_REGION);


        }
        return credentialsProvider;
    }

I show this message on logcat: 我在logcat上显示此消息:

com.amazonaws.services.cognitoidentity.model.ResourceNotFoundException: IdentityPool 'us-east-2:****' not found. (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: ***)

How can I solve this problem ? 我怎么解决这个问题 ?

You need to update the SDK to the latest version. 您需要将SDK更新到最新版本。 Can you set your gradle dependencies to consume SDK version 2.6.0 instead of the ones you have eg 2.3.2 ? 您是否可以将gradle依赖关系设置为使用2.6.0版的SDK,而不是使用2.3.2 That should fix the error. 那应该修复错误。 Some of the newer regions are only available in latest versions. 某些较新的区域仅在最新版本中可用。

Thanks, Rohan 谢谢,罗汉

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM