Hello, i am trying to create a new project using p...
# general
b
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
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
they should be getting read from my aws credentials file
let me try logging out and back in
l
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
Thanks I'll give that a try
m
The same thing was happening to me. I had to set up the environment variables for AWS and it worked for me.
b
Thing is it works for me on existing projects I've deployed but not while creating a new project
m
Yeah, that happened to me too, my previous projects were just fine
b
hmm unfortunately setting up env varibales didnt cut it for my case 🙁
l
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
This is a bug which is being fixed
👀 1
l
Ah. So to work around, can OP use a non-default provider? Or set values explicitly through config or constructor?
b
downgrade to a version lower than 5.7.0
b
Npm version? I thought pulumi latest was 3.34.0 ?
b
pulumi-aws
in your
package.json
👀 1
a
They just release 5.7.2
which is suppose to fix this issue