This message was deleted.
# aws
s
This message was deleted.
b
hey Tony! I could be wrong, but i think there's a typo here?
Copy code
[dev-pulumi]
aws_access_key_id = redacted
aws_secret_access_key = redacted

[profile dev-pulumi]
source_profile = dev_pulumi
role_arn = arn:aws:iam::redacted:role/redacted-TEMP
shouldn't this be
dev-pulumi
(dash, not underscore?) I don't see any
dev_pulumi
profile
p
well that's horribly embarassing
that totally was the issue. thank you much!
b
glad it was simple!
p
well maybe not... just realized in testing I created a user out of scope in the dev account to test that it worked and it worked with the user/role being in the same account. When I switch the awsprofile in the Pulumi.dev.yaml to just
dev
file it fails with
Copy code
error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
this is the one that is logging in to the identity account and then role switching to another account entirely. for example the identity account number is 123456, and the dev account number is 098765
Copy code
[profile prod]
source_profile = prod-main
role_arn = arn:aws:iam::123456:role/role-TEMP
mfa_serial = arn:aws:iam::123456:mfa/tony

[profile dev]
source_profile = prod-main
role_arn = arn:aws:iam::098765:role/role-TEMP
mfa_serial = arn:aws:iam::123456:mfa/tony
b
i'm not totally sure of the answer to that, it seems you're using profiles in a fairly unique way and I'm unfortunately not familiar with it - ultimately Pulumi will use the profile if it's set up correctly, it uses the AWS GO SDK
a
@purple-orange-91853 Check the Pulumi section here, maybe it will help: https://gist.github.com/Sodki/95b04ee9f4f44ed81de23b0cff3a4685
p
for context I am using the standard method by AWS to authenticate against different accounts. The roles and policies are configured correctly as I can switch via the AWS CLI and have access to the correct resources when using
--profile
in my cli strings. See
Example scenario: Allow an instance profile role to switch to a role in another account
in this AWS doc for reference. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-cli.html
b
@purple-orange-91853 it might be easier to jump on a call to get this configured, can you grab some time from here for next week? https://calendly.com/d/mxtb-bs7b/30-minute-meeting