Cannot read property 'accessKeyId' of undefined, after latest update

See original GitHub issue

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

17.7.1

Amplify CLI Version

8.1.0

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

N/A

Amplify Categories

auth, api

Amplify Commands

pull, push, status

Describe the bug

After running aws-vault exec foo When performing an amplify command, error Failed to get profile: Cannot read property 'accessKeyId' of undefined presents itself.

If I remove aws-vault, and create a credentials file in my ~/.aws folder and add the credentials there, I get a different error: Name: ResourceNotFoundException : Message: User pool **-******-******** does not exist.

Expected behavior

The command(s) should work

Reproduction steps

Using AWS-VAULT

  1. aws-vault exec foo All commands there after present error

GraphQL schema(s)

# Put schemas below this line


Log output

# Put your logs below this line


Additional information

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:47 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
josefaidtcommented, May 25, 2022

Hey @vkanagarajan glad to hear you’re back up and running, and thanks @m98 for chiming in here! I’m glad to hear you’ve found value out of this thread!

Given the issue is now resolved I will close this for now, however if this issue reappears please reply back to this thread and we can re-open to investigate further 🙂

2reactions
josefaidtcommented, May 19, 2022

Hey @vkanagarajan I was able to reproduce this if I point my profileName in amplify/.config/local-aws-info.json to a profile name that does not exist on my machine:

{
  "dev": {
    "configLevel": "project",
    "useProfile": true,
    "profileName": "doesnotexist"
  }
}

Can you confirm the profile default exists within your AWS configuration at ~/.aws/credentials?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amplify install error "Failed to get profile: Cannot read property ...
Originaly the error I got for the above command was 'Failed to get profile: Cannot read property 'accessKeyId' of undefined' . I then ......
Read more >
Class: AWS.Credentials — AWS SDK for JavaScript
Represents your AWS security credentials, specifically the accessKeyId, secretAccessKey, and optional sessionToken. Creating a Credentials object allows you ...
Read more >
Determining the access key ID and the secret access key - IBM
Log in to the IBM Cloud console and navigate to your instance of Object Storage. In the side navigation, click Service Credentials. Click...
Read more >
S3 Data Connections [secured] / categori.se - Observable
This notebook won't 'work' for you, since it depends on my ... loaded_S3_object = TypeError: Cannot read properties of undefined (reading ...
Read more >
Resolve "AWS Access Key Id" errors when sending requests ...
I want to access my Amazon Simple Storage Service (Amazon S3) bucket using the AWS Command Line Interface (AWS CLI), an AWS SDK,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found