https://pulumi.com logo
#general
Title
# general
b

billowy-oxygen-65892

06/09/2022, 10:28 PM
Hello, i am trying to create a new project using pulumi but for some reason it is not picking up my aws credentials. When deploying an existing project it reads creds fine. Any ideas?
l

little-cartoon-10569

06/09/2022, 10:34 PM
How are you getting the creds in? AWS_PROFILE?
aws:
config values? AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY? Are you running in a container?
Have you run
pulumi login
?
b

billowy-oxygen-65892

06/09/2022, 10:36 PM
they should be getting read from my aws credentials file
let me try logging out and back in
l

little-cartoon-10569

06/09/2022, 11:06 PM
You could also set up an AWS provider manually, using the variables explicitly instead of implicitly, and see if that works. If it does, then you know that some other credentials are being picked up by the default provider.
👀 1
b

billowy-oxygen-65892

06/09/2022, 11:18 PM
Thanks I'll give that a try
m

most-jordan-25674

06/09/2022, 11:25 PM
The same thing was happening to me. I had to set up the environment variables for AWS and it worked for me.
b

billowy-oxygen-65892

06/09/2022, 11:34 PM
Thing is it works for me on existing projects I've deployed but not while creating a new project
m

most-jordan-25674

06/09/2022, 11:37 PM
Yeah, that happened to me too, my previous projects were just fine
b

billowy-oxygen-65892

06/09/2022, 11:38 PM
hmm unfortunately setting up env varibales didnt cut it for my case 🙁
l

little-cartoon-10569

06/09/2022, 11:46 PM
You're using code like this?
Copy code
cons aws = new aws.Provider("us-west-2", {
  region: "us-west-2",
  accessKey: envVarAccessKey,
  secretKey: emvVarSecretKey
});
Or if they're in a profile, you can use
Copy code
cons aws = new aws.Provider("us-west-2", {
  region: "us-west-2",
  profile: profileName
});
b

billowy-army-68599

06/09/2022, 11:54 PM
This is a bug which is being fixed
👀 1
l

little-cartoon-10569

06/09/2022, 11:57 PM
Ah. So to work around, can OP use a non-default provider? Or set values explicitly through config or constructor?
b

billowy-army-68599

06/10/2022, 12:15 AM
downgrade to a version lower than 5.7.0
b

billowy-oxygen-65892

06/10/2022, 12:30 AM
Npm version? I thought pulumi latest was 3.34.0 ?
b

billowy-army-68599

06/10/2022, 12:36 AM
pulumi-aws
in your
package.json
👀 1
a

ambitious-lifeguard-6753

06/10/2022, 1:59 AM
They just release 5.7.2
which is suppose to fix this issue
4 Views