I would think that this would work: ```const ...
# general
b
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
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
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
Ahh - are your credentials in
~/.aws/config
? Are you using a
profile
here?
b
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
Yes - this does sound like it might be a bug. Could you open an issue to track this?
b
sure