1

I am creating sample Ionic AWS Starter from in AWS Linux AMI server from this link.

I have installed Ionic, cordova, and created project. when I am giving Creating AWS Mobile Hub Project. It was showing below error. Please help me fix below mentioned issue.

[example-ec2-user@ip-some-ipaddress]: backend awsmobile project creation error

You must enable Mobile Hub service role before using the awsmobile cli
https://console.aws.amazon.com/mobilehub/home?#/activaterole/
Rumit Patel
  • 3,667
  • 10
  • 38
  • 49

2 Answers2

1

This error is usually caused by the AWS Mobile Hub Service Role is missing in you account.

Could you please go to AWS IAM console, and check if you have a role named: "MobileHub_Service_Role". If the role does not exist, please follow the link to enable AWS Mobile Hub in your account. This action will need administrator permissions. Once you enabled AWS Mobile Hub you will be able to create AWS Mobile Hub project.

If you have already the "MobileHub_Service_Role" and still getting this error, please contact me again.

Sincerely,
Shufan K
AWS Mobile Developer Experience

Shufan K
  • 11
  • 2
  • 1
    What fixed the issue for me was adding the `AWSMobileHub_FullAccess` policy to my admin group. The `MobileHub_Service_Role` policy alone didn't work for me. – johnborges Feb 20 '18 at 19:51
  • I have "MobileHub_Service_Role" on my account. Still, I am facing the Issue. – williams499 Feb 21 '18 at 09:40
  • It is working Thank you. The issue is I have created IAM user and logged in EC2 Instance with that UNAME. I am not enabled "MobileHub_Service_Role" in that USER. Now it is cleared – williams499 Mar 18 '18 at 12:01
  • i could only solve this by changing the needed AWS account in `~/.aws/config` to the default user. I tried adding the correct credentials with `awsmobile configure`, but it always uses the credentials from the default user defined in `~/.aws/config` – makkus Mar 19 '18 at 10:40
  • @Shufan I'm facing the same issue (more or less) while all the configurations specified here are set. Could you please take a look at this question? https://stackoverflow.com/questions/49927351/im-not-authorized-to-perform-mobilehubgetproject-while-ive-got-the-administr – Mehran Apr 19 '18 at 18:13
0

This may be an indication that your AWS CLI user does not have permission to perform actions in AWS Mobile Hub. To resolve this, add the managed policy "AWSMobileHub_FullAccess" to your AWS CLI user.

Dan
  • 129
  • 5