Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorType=MissingAuthenticationTokenException and missing documentation to update the IAM role #1311

Closed
ykbryan opened this issue Jul 26, 2018 · 2 comments

Comments

@ykbryan
Copy link

ykbryan commented Jul 26, 2018

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.

I am using Amplify for one of the RN workshop but I am facing errors.
Setup appsync via awsmobile commands:

awsmobile appsync enable
awsmobile appsync configure

Choose IAM_TYPE

However, there is no result and error on the react native console. This is what I saw in the AWS CloudWatch logs:

6fe1ecd5-fe5c-4036-8dfe-2fdfe8000bc2 Begin Request
6fe1ecd5-fe5c-4036-8dfe-2fdfe8000bc2 Request Headers: {content-length=[158], cloudfront-viewer-country=[SG], x-forwarded-proto=[https], accept-language=[en-us], x-forwarded-port=[443], x-forwarded-for=[54.240.199.105, 204.246.166.79], via=[2.0 3d1e30eb4cc84a00e30ba5e6b067e3f7.cloudfront.net (CloudFront)], accept=[application/json, text/plain, */*], cloudfront-is-smarttv-viewer=[false], x-amzn-trace-id=[Root=1-5b5948a6-4460ffe835740938d33d82e8], cloudfront-is-desktop-viewer=[true], cloudfront-is-tablet-viewer=[false], host=[**REMOVED**.appsync-api.ap-southeast-1.amazonaws.com], content-type=[application/json; charset=UTF-8], cloudfront-forwarded-proto=[https], x-amz-cf-id=[EVT2bubxT4_M7T9sj7qwH23SS1X5vH8bfui81m5piucAKS3xy1TgCA==], accept-encoding=[br, gzip, deflate], user-agent=[aws-amplify/0.4.x react-native], cloudfront-is-mobile-viewer=[false]}
6fe1ecd5-fe5c-4036-8dfe-2fdfe8000bc2 Response Headers: {x-amzn-ErrorType=MissingAuthenticationTokenException}
6fe1ecd5-fe5c-4036-8dfe-2fdfe8000bc2 End Request

I followed the exact steps and documentations provided in the AWS Amplify doc (https://aws-amplify.github.io/amplify-js/media/api_guide#using-aws_iam)

What is the expected behavior?

I should be able to get a list of data from graphQL query.

Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?

    "aws-amplify": "^1.0.2",
    "aws-amplify-react-native": "^1.0.2",
    "react": "16.3.1",
    "react-native": "~0.55.2",

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.

There is no result and error on the react native console.

@ykbryan
Copy link
Author

ykbryan commented Jul 26, 2018

I got it working by updating the IAM Role that AWS Mobile Hub has auto-provisioned.
Attaching screenshot for reference.
Missing AppSync IAM policy
Missing AppSync IAM policy

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants