KevinY
KevinY

Reputation: 1239

amplify push yields "The AWS Access Key Id you provided does not exist in our records."

Returning to an app from a few months ago, I ran:

amplify push

which returned

Current Environment: dev

| Category | Resource name         | Operation | Provider plugin   |
| -------- | --------------------- | --------- | ----------------- |
| Api      | e9app201907021400api  | Update    | awscloudformation |
| Auth     | eauth201907021400     | No Change | awscloudformation |
? Are you sure you want to continue? Yes

GraphQL schema compiled successfully.
Edit your schema at /Projects/2019/june/e9-app/amp<snip>0api/schema
✖ An error occurred when pushing the resources to the cloud

The AWS Access Key Id you provided does not exist in our records.

So I generated a new set of credentials in the console and installed them with aws configure.

I ran aws configure list

and got

      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                  default           manual    --profile
access_key     ****************CAGH shared-credentials-file    
secret_key     ****************uU0C shared-credentials-file    
    region                eu-west-1      config-file    ~/.aws/config

checked:

cat ~/.aws/credentials

which returned:

[default]
aws_access_key_id = ****************CAGH
aws_secret_access_key = ****************uU0C

amplify push continues to return the same message. When I go back to the console and look at the user it says "access key age Today" - as opposed to 45 days ago (before I requested new credentials).

Any clues as to what else I can check please?

Upvotes: 2

Views: 2178

Answers (2)

Sara
Sara

Reputation: 41

Try to check your configured 'profileName' in /amplify/.config/local-aws-info.json. In my case, I was trying to run the push command using a different profile and that didn't work. Switching to the correct profile solved the issue.

Upvotes: 4

KevinY
KevinY

Reputation: 1239

It would appear the Inactive key associated with the user account was invalidating the Active key. To test the theory I reactivated the Inactive key. I've since delete the inactive key. So it would seem to me that amplify doesn't see the non-primary key.

Screenshot from aws console

Upvotes: 1

Related Questions