Right, I have this: ``` awsProvider, err := aws.N...
# getting-started
p
Right, I have this:
Copy code
awsProvider, err := aws.NewProvider(ctx, "aws", &aws.ProviderArgs{
			AccessKey: awsConfig.RequireSecret("access_key"),
			SecretKey: awsConfig.RequireSecret("secret_key"),
			Region:    pulumi.String(awsConfig.Require("region")),
		})
		if err != nil {
			return err
		}
and yet I get this:
Copy code
pulumi:providers:aws (aws):
    error: pulumi:providers:aws resource 'aws' has a problem: unable to validate AWS credentials.
    Details: loading configuration: error fetching config from profile, default, Error using profile:
     2, partial credentials found for profile default
what is wrong with pulumi? why would I want to put credentials in my .aws configuration if I am to supply these here?
s
Pulumi's AWS provider uses the same credential chain as TF's AWS provider. You can also store your creds in your stack configuration file.
(Also uses the same credential chain as stuff like boto3.)
Also, you don't need to use an explicit provider unless you want to. There's a default provider that you don't have to declare explicitly. (Some people like to use explicit providers everywhere, tho - nothing wrong with either case.)
p
I had a incomplete default profile for AWS... hence the trouble... And yes, I did in the end put these credentials so AWS uses its default provider (it's an add-on to a GCP project - router53 - hence why I didn't want it to be in defaults, but nonetheless ended up there)
Thank you!