Open edzillion opened 6 years ago
This is a pretty serious issue, or at least a question that can be easily answered:
Is AWS Amplify just meant for single users?
Or putting a more positive spin on it:
Can you provide a working example of an AWS repo with setup instructions?
@edzillion As a note, I had this problem if I had run awsmobile configure globally and setup a user for it.
By clearing all the awsmobile related folders on my user directory and just starting from scratch on the project directory with awsmobile init
I hope this helps.
Hi @edzillion
Sorry to hear that you are having trouble using the awsmobile-cli. The awsmobile-cli and the Amplify library are not meant to be used by single user.
When you init a project on a new machine, the awsmobile-cli will try to resolve aws access credentials from the credentials file in the ~/.aws/ folder. If there is a default profile in the file, it will be used.
If that's not the case, you will need to run awsmobile configure aws
to set the credential for the cli, before you can execute the init command.
The easiest way to resolve your issue is to go to the IAM console, and create a new user will admin rights, and get the accesskeyid and secrect-access-key, then on the new machine, execute awsmobile configure aws
and paste the key id and the key at the prompt.
This link might be helpful.
https://docs.aws.amazon.com/aws-mobile/latest/developerguide/aws-mobile-cli-credentials.html
Ok thanks for the input. I think I may have resolved this:
It seems to want to create a new awsmobilejs
folder each time I run awsmobile init
with a suffix of the date and time; I decided to wipe all of them and then try again, and it worked fine.
So I am wonderng whether it is a bad idea to commit the awsmobile
folder?
There really should be a document outlining this stuff. I looked but couldn't find one.
yes, the cli will create another awsmobilejs folder for most scenarios when you run awsmobile init, and at the same time back up the old contents in the awsmobilejs in a folder that has ~ prefix and timestamp suffix. The contents in the backup folder(s) are not used anymore by the cli. The cli inserts a section in the .gitignore file, and that's the recommended on what should and should not be committed to code repo
Googlers from the future, use npm i -g @aws-amplify/cli
getting this error when trying to set up my awsmobile project on a new machine:
and versions:
I am definitely using valid AWS credentials. The project definitely exists.
Surely AWS Amplify is not just single user? We are trying to use it for our project and 80% of the time I can't set users up with awsmobile because of this problem. Here is our repo FYI
hope you can help