amazon-archives / awsmobile-cli

CLI experience for Frontend developers in the JavaScript ecosystem.
Apache License 2.0
142 stars 35 forks source link

Having a default profile in ~/.aws/credentials seems to break some awsmobile cli calls. #4

Closed MichaelCPell closed 6 years ago

MichaelCPell commented 6 years ago

I am following the tutorial at http://docs.aws.amazon.com/aws-mobile/latest/developerguide/web-access-databases.html#connect-to-your-backend

Running the database and api creation steps worked fine. However when making the POST request AWS sends back a 403. When I examined the request details, my default profile's CREDENTIAL was in the headers. Simply renaming ~/.aws/credentials to ~/.aws/credentialsX fixed.

I investigated setting my ~/.awsmobilejs/aws-config.json as default in ~/.aws/credentials and continued to get 403's.

UnleashedMind commented 6 years ago

Allowing each project have its own individual aws credential profile seems to be the best way to avoid confusions like this. We are having discussions on this, will keep the community posted when there's an update.

mlabieniec commented 6 years ago

@MichaelCPell the latest should, by default, use the default profile with the latest cli. Let us know if you are still having an issue. We have support for profiles in our backlog.