clean-lawyer-5254
04/29/2026, 4:26 AMpulumi config set aws:profile <PROFILE>
does result in a setting in Pulumi.stack.yaml, but it doesn't get used. It keeps using the "`default`" aws profile. If I set the environment variable AWS_PROFILE it then works. Is there some config I'm missing to get
config:
aws:profile: <profile>
to be used for the default profile?little-cartoon-10569
04/29/2026, 5:10 AMlittle-cartoon-10569
04/29/2026, 5:18 AMaws configure list-profiles to check that the profile you're specifying is actually there. AWS config files have been known to hide profiles under the sofa.clean-lawyer-5254
04/29/2026, 5:48 AMaws configure list-profiles does show the profile I want to use.little-cartoon-10569
04/29/2026, 6:06 AMconst awsConfig = new pulumi.Config("aws");
const aws = new Provider("aws", {
region: awsConfig.getString("region"),
}
So (if I recall correctly..) this falls back on defaults.
You would need this to ensure your expected behaviour:
const awsConfig = new pulumi.Config("aws");
const aws = new Provider("aws", {
region: awsConfig.getString("region"),
profile: awsConfig.getString("profile"),
}clean-lawyer-5254
04/29/2026, 6:07 AMlittle-cartoon-10569
04/29/2026, 6:09 AMpulumi:disable-default-providers:
- aws
I don't have to do anything special "before" to get AWS providers to workadamant-lawyer-19698
04/29/2026, 6:09 AMlittle-cartoon-10569
04/29/2026, 6:10 AMunset AWS_PROFILEclean-lawyer-5254
04/29/2026, 6:14 AMconfig:
aws:profile: dev-iotcontrol-deployment
If I either comment out the profile dev-iotcontrol-deployment in my .aws/credentials file, or change the aws:profile setting to a non-existent profile I get
error: pulumi:providers:aws resource 'default_6_83_2' has a problem: unable to validate AWS credentials.
Details: failed to get shared config profile, zzdev-iotcontrol-deployment
But also if I comment out my "[default]" entry in .aws/credentials, I get
error: read ".pulumi/meta.yaml": blob (key ".pulumi/meta.yaml") (code=Unknown): NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
But setting AWS_PROFILE stops this complaint.
export AWS_PROFILE=dev-iotcontrol-deploymentlittle-cartoon-10569
04/29/2026, 6:16 AMlittle-cartoon-10569
04/29/2026, 6:16 AMclean-lawyer-5254
04/29/2026, 6:17 AMlittle-cartoon-10569
04/29/2026, 6:17 AMclean-lawyer-5254
04/29/2026, 6:18 AMlittle-cartoon-10569
04/29/2026, 6:19 AMclean-lawyer-5254
04/29/2026, 6:28 AMclean-lawyer-5254
04/29/2026, 6:29 AMlittle-cartoon-10569
04/29/2026, 7:03 AMversion: 1
Maybe you can delete it and try again? Pulumi should re-create it.