Reputation: 4049
get the exception :
Unable to execute HTTP request: Unable to resolve host "cognito-identity.eu-central-1.amazonaws.com": No address associated with hostname
Unable to resolve host "cognito-identity.eu-central-1.amazonaws.com": No address associated with hostname
The code is the following :
// Initialize the Amazon Cognito credentials provider
CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(
getApplicationContext(), // Application Context
getResources().getString(R.string.AWS_IdentityPoolId), // Identity Pool ID
Regions.EU_CENTRAL_1 // Region enum
);
Upvotes: 0
Views: 305
Reputation: 1876
FYI, Cognito Identity isn't available in EU_CENTRAL_1 (Frankfurt) yet. Checkout AWS Service Region Availability. Like Anthony said, Cognito Identity doesn't have to be in the same region of other services. Please always choose regions close to you for better experience.
Upvotes: 1
Reputation: 4049
This is "just" question of Region. As my Cognito is in IRELAND, and my Bucket in Franckfurt,a confusion is easy. So you may be carefull on region. In may case :
// Initialize the Amazon Cognito credentials provider
CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(
getApplicationContext(), // Application Context
getResources().getString(R.string.AWS_IdentityPoolId), // Identity Pool ID
Regions.EU_WEST_1 // Region enum
);
Upvotes: 1