EB CLI with and AWS CLI doesn't recognize SSO sso_start_url and sso_region configuration

4.2k Views Asked by At

I installed EB CLI following these instructions.

To use it, I configured AWS CLI for SSO following these instructions.

This creates a config file in ~/.aws/config with these contents:

[profile <profile_name>]
sso_session = <session_name>
sso_account_id = <account_no>
sso_role_name = <role_name>
region = <region>
output = json
[sso-session <session_name>]
sso_start_url = <start_url>
sso_region = <region>
sso_registration_scopes = <scopes>

All the values seem to be correct.

Once configured, I can login using SSO using:

aws sso login --profile <profile_name>

This redirects me to the SSO <start_url> and I get the confirmation for login:

Successfully logged into Start URL: <start_url>

EB CLI is supposed to be able to login using the authentication methods set with AWS CLI. I am trying to do so with:

eb init --profile <profile_name>

However, after selecting the region, I get this error:

ERROR: InvalidConfigError - The profile "<profile_name>" is configured to use SSO but is missing required configuration: sso_start_url, sso_region

I am not sure what I am missing as the ~/.aws/config file seems to be properly set with the sso_start_url and sso_region I specified in the AWS CLI configuration.

Is there any other intermediate step to get EB CLI working with SSO?

1

There are 1 best solutions below

1
On

I had a similar problem, but with boto3, not EB. Same error message though, in my Python script when I created a client. I realised that in the virtual environment, I hadn't updated boto3 in two years. When I updated it, it worked. Try updating your EB CLI or boto3 if you have that.