nice-toothbrush-68985
12/23/2025, 4:20 PMunable to validate AWS credentials error during pulumi deployment of a stack with newly added Deployment Settings (python)
I was expecting pulumi deployments to use the ESC environment: configured in the pulumi.<stack>.yaml
but while writing this post to ask for help I actually found out my original issue 💪 but I have another 😞
It turns out that having config.aws:profile in pulumi.<stack>.yaml can interfere with Pulumi Deployments loading of ESC environment,
my workflow was to do local infra development, with valid local aws session, and now I started working on getting the stack automated with deployments.
thus I was using aws:profile to target a specific profile in my ~/.aws/config, I fixed the error by commenting out this 'local' configuration, and letting pulumi use environment with ESC without targeting a profile..
But now I cannot run pulumi preview locally to iterate fast on new code before committing to a side-branch,
I'm now getting unable to validate AWS credentials. locally, how can I use the esc environment and use the dynamic oidc based credentials locally?nice-toothbrush-68985
12/23/2025, 4:28 PMESC environment is missing pulumiConfig
but I'm unsure what I should put therenice-toothbrush-68985
12/23/2025, 4:30 PMvalues:
pulumiConfig:
aws:accessKey: ${aws.login.accessKeyId}
aws:secretKey: ${aws.login.secretAccessKey}
aws:token: ${aws.login.sessionToken}nice-toothbrush-68985
12/23/2025, 4:30 PMnice-toothbrush-68985
12/23/2025, 4:36 PMenvironmentVariables:
AWS_ACCESS_KEY_ID: ${aws.login.accessKeyId}
AWS_SECRET_ACCESS_KEY: ${aws.login.secretAccessKey}
AWS_SESSION_TOKEN: ${aws.login.sessionToken}
as wellnice-toothbrush-68985
12/23/2025, 4:43 PMesc run aws-login/development-env -- aws sts get-caller-identity
{
"UserId": "FOOBAR:pulumi-environments-session",
"Account": "012345678",
"Arn": "arn:aws:sts::012345678:assumed-role/pulumi-esc-oidc-org-AdministratorAccess-role/pulumi-environments-session"
}nice-toothbrush-68985
12/23/2025, 4:45 PM~/.aws/config
[default]
source_profile = dev
region = us-east-1nice-toothbrush-68985
12/23/2025, 4:45 PMsource_profile was messing up pulumi's aws invocationnice-toothbrush-68985
12/23/2025, 4:46 PMdev account 🙂