https://pulumi.com logo
b

billowy-laptop-45963

11/15/2019, 9:30 PM
I would think that this would work:
Copy code
const
        opts = {provider: provider},
        callerId = aws.getCallerIdentity(opts),
        region = aws.getRegion({}, opts)
where provider is
new aws.Provider('myprovider', {profile: profile, region: region})
but they return
unable to discover AWS AccessKeyID and/or SecretAccessKey
w

white-balloon-205

11/15/2019, 9:34 PM
I tried something similar to this and it worked for me. Are you providing credentials to the input to your
Provider
? (or getting them from ambient AWS configuration?)
b

billowy-laptop-45963

11/15/2019, 9:34 PM
Weird running pulumi up like
AWS_SDK_LOAD_CONFIG=true pulumi up
fixed the above.
I've been using that provider fine for building everything else
w

white-balloon-205

11/15/2019, 9:35 PM
Ahh - are your credentials in
~/.aws/config
? Are you using a
profile
here?
b

billowy-laptop-45963

11/15/2019, 9:35 PM
ya
provider is defined like above where profile is the profile name to use.
I think this might be a bug somewhere since I don't need AWS_SDK_LOAD_CONFIG=true for the resources, only those data calls
w

white-balloon-205

11/15/2019, 9:37 PM
Yes - this does sound like it might be a bug. Could you open an issue to track this?
b

billowy-laptop-45963

11/15/2019, 9:37 PM
sure