I have the following profile in ~/.aws/config
:
[profile foo]
role_arn = arn:aws:iam::##########:role/SomeRole
source_profile = other_profile
region = us-west-2
For unrelevant reasons, I want to create a new profile -with a differen name- but sharing the same configuration as foo
.
Since I don't like duplicating stuff, I was wondering if there's a way for two profiles to use the same configuration?
I have tried the following:
[profile bar]
[profile foo]
role_arn = arn:aws:iam::##########:role/SomeRole
source_profile = other_profile
region = us-west-2
And it didn't work. The CLI thinks bar
is an empty profile.
I've also tried:
[profile foo bar]
role_arn = arn:aws:iam::##########:role/SomeRole
source_profile = other_profile
region = us-west-2
And also didn't work. The CLI is unable to find bar
profile.
Is there a way to achieve this?