jorgebastida / jorgebastida/awslogs
Stacktrace on using --aws_region="eu-west-1"
- Dominant language
- Python
- Stars
- 5k
- Forks
- 342
- PR merge metrics
- No merged PRs in 30d
Description
```
Alex.LordThorsen@esmbp-C02DV3Y1ML7H ~/git [2] :( % awslogs --aws_region="eu-west-1"
You've found a bug! Please, raise an issue attaching the following traceback
https://github.com/jorgebastida/awslogs/issues/new
Version: 0.14.0
Python: 3.8.7 (default, Dec 30 2020, 10:13:08)
[Clang 12.0.0 (clang-1200.0.32.28)]
boto3 version: 1.16.52
Platform: macOS-10.15.7-x86_64-i386-64bit
Args: ['/usr/local/bin/awslogs', '--aws_region=eu-west-1']
Config: {'aws_access_key_id': 'SENSITIVE', 'aws_secret_access_key': 'SENSITIVE', 'aws_session_token': 'SENSITIVE', 'aws_profile': 'SENSITIVE'}
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/awslogs/bin.py", line 175, in main
logs = AWSLogs(**vars(options))
File "/usr/local/lib/python3.8/site-packages/awslogs/core.py", line 89, in __init__
self.client = boto3_client(
File "/usr/local/lib/python3.8/site-packages/awslogs/core.py", line 44, in boto3_client
return session.client(
File "/usr/local/lib/python3.8/site-packages/boto3/session.py", line 258, in client
return self._session.create_client(
File "/usr/local/lib/python3.8/site-packages/botocore/session.py", line 834, in create_client
client = client_creator.create_client(
File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 85, in create_client
client_args = self._get_client_args(
File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 326, in _get_client_args
return args_creator.get_client_args(
File "/usr/local/lib/python3.8/site-packages/botocore/args.py", line 71, in get_client_args
final_args = self.compute_client_args(
File "/usr/local/lib/python3.8/site-packages/botocore/args.py", line 147, in compute_client_args
endpoint_config = self._compute_endpoint_config(
File "/usr/local/lib/python3.8/site-packages/botocore/args.py", line 218, in _compute_endpoint_config
return self._resolve_endpoint(**resolve_endpoint_kwargs)
File "/usr/local/lib/python3.8/site-packages/botocore/args.py", line 300, in _resolve_endpoint
return endpoint_bridge.resolve(
File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 401, in resolve
resolved = self.endpoint_resolver.construct_endpoint(
File "/usr/local/lib/python3.8/site-packages/botocore/regions.py", line 133, in construct_endpoint
result = self._endpoint_for_partition(
File "/usr/local/lib/python3.8/site-packages/botocore/regions.py", line 148, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.
Alex.LordThorsen@esmbp-C02DV3Y1ML7H ~/git [1] :( % awslogs --version
awslogs 0.14.0
Alex.LordThorsen@esmbp-C02DV3Y1ML7H ~/git :)% python3 --version
Python 3.8.7
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with `awslogs --aws_region="eu-west-1"`, then start at `awslogs/bin.py` line 175 and follow the client setup in `awslogs/core.py` lines 44 and 89. Check how the region reaches the boto3 client and run the project tests; done means the command accepts the supplied region without raising `NoRegionError`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100