2

I am attempting to configure AWS credentials using IAM Identity Center SSO token provider, but I am getting this error Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1

This is my current ~/.aws/config setup

[profile lalala]
sso_account_id = XXXXXXXXXXXX
sso_role_name = permission-set-name
sso_region = **-****-**
sso_start_url = https://******.awsapps.com/start

I am able to get a list of all the buckets in my account using this command aws s3 ls --profile lalala

however when I run my nodejs application using the following command AWS_PROFILE=lalala nodemon -L, the credentials don't get recognized and I see the following error Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1

(I have tried setting AWS_SDK_LOAD_CONFIG to 1 and still get the same error.)

Is there another way to set up credentials?

trynaLearn
  • 21
  • 3
  • 1
    Based on [several open issues](https://github.com/search?q=org%3Aaws+Missing+credentials+in+config%2C+if+using+AWS_CONFIG_FILE%2C+set+AWS_SDK_LOAD_CONFIG%3D1&type=issues) this seems to be a known bug, or intentional behavior depending on where it comes from. If setting the region in your config as per [this comment](https://github.com/aws/aws-sdk-js/issues/3665#issuecomment-1272257650) doesn't get things working, it may be worth opening another issue on the SDK's repo. – Zac Anger Jan 23 '23 at 03:43
  • [AWS Vault](https://github.com/99designs/aws-vault) might be able to help here. It should pick up your existing SSO configuration in `~/.aws/config`. You should be able to run `aws-vault exec lalala -- nodemon -L`. – D Malan Jan 31 '23 at 00:02

0 Answers0