sticky-airline-40485
11/01/2021, 2:13 PMunable to discover AWS AccessKeyID and/or SecretAccessKey
. Anyone else encountering this?billowy-army-68599
11/01/2021, 2:45 PMsticky-airline-40485
11/01/2021, 3:07 PM.aws
folder
config
file:
[profile michael]
region = eu-west-1
credentials
file:
[michael]
aws_access_key_id = ###
aws_secret_access_key = ###
In my Pulumi folder, I have two stacks, a dev
stack and a prod
stack. Both my Pulumi.dev.yaml
and Pulumi.prod.yaml
files are identical:
config:
aws:profile: michael
aws:region: eu-west-1
Running pulumi up -s dev
runs fine, but running pulumi up -s prod
gives me the unable to discover AWS AccessKeyID and/or SecretAccessKey
errorbillowy-army-68599
11/01/2021, 3:07 PMaws sts get-caller-identity
return?prod
stack and readd itsticky-airline-40485
11/01/2021, 3:09 PMwhat doesI get 55###96 arn:aws:iam::55###96:user/michael.truong AI###SDreturn?aws sts get-caller-identity
can you remove the profile key from theSorry, what you you mean by read it?stack and readd itprod
pulumi config set aws:profile michael
and it adds fine, which is what adds to my confusionbillowy-army-68599
11/01/2021, 3:13 PMsticky-airline-40485
11/01/2021, 3:14 PMbillowy-army-68599
11/01/2021, 3:14 PMsticky-airline-40485
11/01/2021, 3:24 PMdev
stack, the profile and region are set in the AWS provider for both inputs and outputs, but in prod
they aren't
dev
stack (excerpt):
{
"urn": "urn:pulumi:dev::app::pulumi:providers:aws::default_4_25_0",
"custom": true,
"id": "###",
"type": "pulumi:providers:aws",
"inputs": {
"profile": "michael",
"region": "eu-west-1",
"version": "4.25.0"
},
"outputs": {
"profile": "michael",
"region": "eu-west-1",
"version": "4.25.0"
}
},
prod
stack (excerpt):
{
"urn": "urn:pulumi:prod::app::pulumi:providers:aws::default_4_25_0",
"custom": true,
"id": "###",
"type": "pulumi:providers:aws",
"inputs": {
"version": "4.25.0"
},
"outputs": {
"version": "4.25.0"
}
},
seems to be only one profile in both stacks, but interestingly, in thebillowy-army-68599
11/01/2021, 3:25 PMup
with a valid profile set to fix itsticky-airline-40485
11/01/2021, 3:27 PMpulumi up -s dev
works fine but pulumi up -s prod
complains, even though they both reference the same (valid) profilebillowy-army-68599
11/01/2021, 3:32 PMsticky-airline-40485
11/01/2021, 3:33 PMpulumi up -s dev
works just fine and it points to the same profilebillowy-army-68599
11/01/2021, 3:36 PMup
isn't working yet, you'll need to have valid credentialssticky-airline-40485
11/01/2021, 3:37 PMbillowy-army-68599
11/01/2021, 3:50 PMaws sts get-caller-identity
and then ensure you can perform AWS operations like aws s3 ls
from your current profile
• run a successful pulumi up
• then readd the aws:profile
config setting
also make sure you don't have any explicit providers on your resourcessticky-airline-40485
11/01/2021, 4:31 PMAWS_*
environment variables directly, this works. I'll file this as an issue as I shouldn't have had to do that