Open rafihm opened 6 years ago
rdk 0.7.10 and i am seeing same error today.
update: it seems like only default profile will work, other named profiles will not even if prefix command with AWS_PROFILE=xxx
I am still facing this issue. Do we have any solution to fix this ?
Possible design here:
Wrap return Session(**session_args)
with a try-except. Raise
a user-oriented exception if it fails.
currenly RDK throws below stack trace if no/invalid credentials are specified. A proper error message would be nice.
root@ip-172-31-43-115:~# rdk init Running init! Traceback (most recent call last): File "/usr/local/bin/rdk", line 33, in
return_val = my_rdk.process_command()
File "/usr/local/lib/python2.7/dist-packages/rdk/rdk.py", line 68, in process_command
exit_code = method_to_call()
File "/usr/local/lib/python2.7/dist-packages/rdk/rdk.py", line 93, in init
my_config = my_session.client('config')
File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 889, in create_client
client_config=config, api_version=api_version)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 76, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 291, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/usr/local/lib/python2.7/dist-packages/botocore/args.py", line 45, in get_client_args
endpoint_url, is_secure, scoped_config)
File "/usr/local/lib/python2.7/dist-packages/botocore/args.py", line 112, in compute_client_args
service_name, region_name, endpoint_url, is_secure)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 364, in resolve
service_name, region_name)
File "/usr/local/lib/python2.7/dist-packages/botocore/regions.py", line 122, in construct_endpoint
partition, service_name, region_name)
File "/usr/local/lib/python2.7/dist-packages/botocore/regions.py", line 135, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.