AWS Cognito Identiy - "{cognito-identity, us-east-2} не найдено в метаданных региона"
Я пытаюсь использовать AWS Cognito Identity для создания пользователей. Я следую этому учебнику ( http://docs.aws.amazon.com/cognito/latest/developerguide/tutorial-integrating-user-pools-android.html).
Вот мой код:
открытый класс testLogin расширяет AppCompatActivity {
ClientConfiguration clientConfiguration = new ClientConfiguration();
String clientId = "########################";
String poolId = "############";
String clientSecret = "###############################";
CognitoUserPool userPool;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test_login);
userPool = new CognitoUserPool(getApplicationContext(), poolId, clientId, clientSecret, clientConfiguration);
CognitoUserAttributes userAttributes = new CognitoUserAttributes();
userAttributes.addAttribute("given_name", "test");
userAttributes.addAttribute("email", "testEmail@gmail.com");
userPool.signUpInBackground("testUserName", "TestPW2!#", userAttributes, null, signupCallback);
}
SignUpHandler signupCallback = new SignUpHandler() {
@Override
public void onSuccess(CognitoUser cognitoUser, boolean userConfirmed, CognitoUserCodeDeliveryDetails cognitoUserCodeDeliveryDetails) {
// Sign-up was successful
// Check if this user (cognitoUser) needs to be confirmed
if(!userConfirmed) {
// This user must be confirmed and a confirmation code was sent to the user
// cognitoUserCodeDeliveryDetails will indicate where the confirmation code was sent
// Get the confirmation code from user
}
else {
// The user has already been confirmed
}
}
@Override
public void onFailure(Exception exception) {
// Sign-up failed, check exception for the cause
}
};
} `
А вот что выводит Android Monitor:
08-03 13:25:44.281 6299-6299/? I/art: Not late-enabling -Xcheck:jni (already on)
08-03 13:25:44.282 6299-6299/? W/art: Unexpected CPU variant for X86 using defaults: x86
08-03 13:25:44.299 6299-6306/? E/art: Failed sending reply to debugger: Broken pipe
08-03 13:25:44.299 6299-6306/? I/art: Debugger is no longer active
08-03 13:25:44.299 6299-6306/? I/art: Starting a blocking GC Instrumentation
08-03 13:25:44.433 6299-6299/? W/System: ClassLoader referenced unknown path: /data/app/com.example.android.mathbattlestest-1/lib/x86
08-03 13:25:44.444 6299-6299/? I/InstantRun: starting instant run server: is main process
08-03 13:25:44.645 6299-6299/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
08-03 13:25:44.868 6299-6299/? I/AmazonWebServiceClient: {cognito-identity, us-east-2} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'cognito-identity.us-east-2.amazonaws.com'.
08-03 13:25:44.881 6299-6299/? I/AmazonWebServiceClient: {cognito-sync, us-east-2} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'cognito-sync.us-east-2.amazonaws.com'.
08-03 13:25:45.083 6299-6299/? W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
[ 08-03 13:25:45.106 6299: 6317 D/ ]
HostConnection::get() New Host Connection established 0x99087e40, tid 6317
08-03 13:25:45.107 6299-6317/? I/OpenGLRenderer: Initialized EGL, version 1.4
08-03 13:25:45.108 6299-6317/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
Как исправить эту ошибку: "I/AmazonWebServiceClient: {cognito-sync, us-east-2} не найден в метаданных региона..."
Мой текущий код не добавляет нового пользователя (или вообще ничего) в мой пул пользователей.