-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'accessKeyId' of undefined, after latest update #10367
Comments
Hey @adcanis 👋 when using the AWS credentials and config files, can you confirm the region is set to the region which the Amplify app is deployed to? |
@josefaidt yes everything is there. I did run aws configure when removing aws-vault and using the credentials file. But there is not [default] listed in either file |
Hey @adcanis thanks for the clarification! In your amplify app's directory what Amplify CLI command are you executing to receive the "user pool ... does not exist" error? Is this on |
@josefaidt it doesn't matter what command, even |
@josefaidt I should add... if I run [profile foo-dev] This repeats for qa, prod |
Hey @adcanis based on the error for "Cognito does not exist" it appears the Amplify CLI is successfully authenticating however is not able to find the resource in the specified account and region. If this is an existing project you have locally, is it possible the {
"dev": {
"configLevel": "project",
"useProfile": true,
"profileName": "default"
}
} |
@josefaidt thats just it. Everything is as it should be. Project works as expected, user pool authentication works and all that. I did a bit of updates to the schema today in regards to some resolvers, went to push, updated the cli and then this error |
Hey @adcanis can you confirm the Cognito User Pool ID shown in |
@josefaidt my file inside the This was the order in my commands prior to the error:
then I ran went to run |
Hey @adcanis thanks for the clarification! I was looking to see if we potentially have a mismatch of Cognito ID's in our local copy versus what we're seeing in the AWS Console for Cognito. Do you also have a supplemental |
So the ` [profile foo ] [profile foo-dev] And so on with the subsequent profiles. |
Hey @adcanis to clarify further are you attempting to use temporary credentials with the Amplify CLI? |
That's how I've always done it yes. At least with this project specifically |
@m98 dis you update to the latest cli as well? I've even deleted my |
Yes. I use version 8.1.0 which is the latest version on NPM. |
For me, the problem was solved when I deleted the |
@m98 Good to know. I will try that today and do a pull. Just to confirm, are you running aws-vault to set temp credentials or are you using a credentials file? |
I ran |
@josefaidt @m98 Just wanted to say thanks for all the help. The resolution seems to be to remove the |
Hey @vkanagarajan I was able to reproduce this if I point my profileName in {
"dev": {
"configLevel": "project",
"useProfile": true,
"profileName": "doesnotexist"
}
} Can you confirm the profile |
I have fixed this issue created new user and added the access and secret key |
@josefaidt In my case, I guess maybe the AWS Toolkit for my IDE caused this! With that you can rename the credintials! It's good to know if other people in this thread who had this issue were also using AWS Toolkit! |
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 🙂 |
I faced the same issue, sorted out by doing the following. Under Amplify -> .config -> local-aws-info.json profile name was defined as ABC whereas new profile I created did not match the name. Simple went to ~/Users/username/.aws/ and changed profile name in credentials and config file to match the project. Or you can do the other way around if profile is being used by multiple projects or define a new profile with matching name, |
@josefaidt - This shouldn't be closed! I have wrapped Amplify into a pretty complex setup, and everything has been working as expected. I am externalizing some specifics around CI/CD (and CI/CD steps), and in my EXTERNAL CI/CD system (as well as on my local machine, outside of my github repo - in some empty folder), I am getting the following errors. Scenario:
Reproduce:
Command permutation 1
Error Result:
Command permutation 2
Error Result:
ObservationsI know for sure the region and credentials are all set up correctly because I'm doing it this way:
AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY are injected as env vars in my CI/CD pipeline I know it's working because I get the values back when I log them/echo them in the build pipeline |
I'm using @aws-amplify/cli v10.0.0. I did |
Hey folks I've reopened this issue as a feature request to potentially expose a |
The same bug now appears when running 'amplify init -y' as part of performing the steps in Module 1 of the AWS tutorial "Deploy a Web Application on AWS Amplify" here: https://aws.amazon.com/getting-started/guides/deploy-webapp-amplify/module-one/. |
I get this same error with this same tutorial - after creating a new user with all privileges and new accessKeyID: `Project information Using default provider awscloudformation |
I'm getting this error in CI/CD pipeline running I have configured my default profile credentials using |
I am getting the same error ⠋ Fetching AWS Amplify Console domains🛑 Failed to get profile credentials |
Hi @armenr, it looks that in your example you have some extra quotes after the We already support passing profile name as the Nonetheless, this error message is terribly misleading, and we need to improve how we parse the command line arguments as a separate task. As a workaround to generate the correct syntax, I can suggest using the scripts from our documentation page and add |
|
Hi guyz, I melt 3hours for this fucking problem: $ amplify -v
11.0.5
$ amplify status # same for amplify publish
...
🛑 Failed to get profile credentials
Cannot read property 'accessKeyId' of undefined And finally resolved it as below procedure with my profile set in
|
ok - I'm using an SSO profile to deploy. I run There is clearly an bug for (at least) |
Definitely not fixed. |
Ugh just ran into this as well. |
Before opening, please confirm:
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
All commands there after present error
GraphQL schema(s)
# Put schemas below this line
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: