I am trying to run the AWS android samples from the following git repo:
I am receiving the following error message:
Unauthenticated access is not supported. (Service:
AmazonCognitoIdentityService; Status Code: 400; Error Code:
NotAuthorizedException; Request ID:
I have configured the AWS services as per the steps mentioned in the git repo
I have included the following jars in libs:
Also I have added the
BUCKET_NAME. I was
not sure where to find the
COGNITO_ROLE_UNAUTH so I left it at
Could anyone tell me what I am doing wrong here?
Sorry that you’re having trouble with the sample. There are two things which I think might solve your problem.
First of all, did you enable unauthenticated access in your Congito identity pool? You can check by going to the Cognito console, going to
Edit Identity Pool, and seeing if
Enable access to Unauthenticated Identities is checked.
Secondly, you’ll need to set
COGNITO_ROLE_UNAUTH. To do this, you will first need to go to the IAM console and create a Role if you don’t already have one. Then, click on the role in the IAM console and click
Summary. The first thing under the
Summary tab should be
Role ARN. Replace
YOUR_COGNITO_UNAUTH_ROLE with the value found there.
Hope that helps and I’ll see if we can make the docs more clear. Sorry again for the trouble!