botocore.exceptions.ProfileNotFound: The config profile (xxx-xxx) could not be found
See original GitHub issueI get this sometimes:
$ aws-google-auth --idp-id qqqqqqqq --sp-id 123456879 --username user@domain.com --duration 43200 --role-arn arn:aws:iam::6666666666:role/sso/sso-administrator --profile xxx-xxx --keyring
Failed to import U2F libraries, U2F login unavailable. Other methods can still continue.
Open the Google App, and tap 'Yes' on the prompt to sign in ...
Assuming arn:aws:iam::6666666666:role/sso/sso-administrator
Traceback (most recent call last):
File "/usr/local/bin/aws-google-auth", line 11, in <module>
sys.exit(main())
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 226, in main
cli(cli_args)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 65, in cli
process_auth(args, config)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 216, in process_auth
print("Credentials Expiration: " + format(amazon_client.expiration.astimezone(get_localzone())))
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/amazon.py", line 50, in expiration
return self.token['Credentials']['Expiration']
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/amazon.py", line 29, in token
self.__token = self.sts_client.assume_role_with_saml(
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/amazon.py", line 20, in sts_client
return boto3.client('sts', region_name=self.config.region)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/boto3/__init__.py", line 91, in client
return _get_default_session().client(*args, **kwargs)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/boto3/__init__.py", line 80, in _get_default_session
setup_default_session()
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/boto3/__init__.py", line 34, in setup_default_session
DEFAULT_SESSION = Session(**kwargs)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/boto3/session.py", line 80, in __init__
self._setup_loader()
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/boto3/session.py", line 120, in _setup_loader
self._loader = self._session.get_component('data_loader')
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 729, in get_component
return self._components.get_component(name)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 946, in get_component
self._components[name] = factory()
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 186, in <lambda>
lambda: create_loader(self.get_config_variable('data_path')))
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 281, in get_config_variable
elif self._found_in_config_file(methods, var_config):
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 308, in _found_in_config_file
return var_config[0] in self.get_scoped_config()
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/botocore/session.py", line 385, in get_scoped_config
raise ProfileNotFound(profile=profile_name)
botocore.exceptions.ProfileNotFound: The config profile (xxx-xxxx) could not be found
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
AWS : The config profile (MyName) could not be found
This happened to me when AWS config file was not found since the user starting the service was a root user, when i...
Read more >The config profile (default) could not be found – iTecNote
I'm facing issue while export CSV from pandas datafram to S3, getting below error: The config profile (default) could not be found: ProfileNotFound...
Read more >The config profile (default) could not be found - appsloveworld
I'm facing issue while export CSV from pandas datafram to S3, getting below error: The config profile (default) could not be found: ProfileNotFound...
Read more >cloud-custodian/cloud-custodian - Gitter
... in get_scoped_config raise ProfileNotFound(profile=profile_name) botocore.exceptions.ProfileNotFound: The config profile (xxxxxx) could not be found.
Read more >aws cli ProfileNotFound - Life in USA - WordPress.com
... kms encrypt xxx, the botocore.exceptions.ProfileNotFound: The config profile (SOME_DEV_ROLE) could not be found constantly pop up.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been improved, shouldn’t get a crazy error any more.
If it’s any consolation, the AWS CLI doesn’t handle it either:
😁