I have 2 AWS accounts and have set up cross account authentication using IAM roles.
I have created a AWS CLI named profile for the second account, which uses a role_arn and specifies my default profile as the source_profile.
For my default profile, I keep my KEY and SECRET as environment variables, rather than as static strings in the ~/.aws/credentials file.
However, when I switch to the named profile, and query the API, I get the following error:
The source_profile "default" must specify either static credentials or an assume role configuration
Is there any way I can get a named profile to refer to my environment variable credentials rather than static credentials in ~/.aws/credentials?