jorgebastida / jorgebastida/awslogs
awslogs get help - Invalid endpoint: https://logs.US West (Oregon).amazonaws.com
- Dominant language
- Python
- Stars
- 5k
- Forks
- 342
- PR merge metrics
- No merged PRs in 30d
Description
Version: 0.14.0
Python: 3.9.0 (default, Oct 27 2020, 14:15:17)
[Clang 12.0.0 (clang-1200.0.32.21)]
boto3 version: 1.14.20
Platform: macOS-10.15.7-x86_64-i386-64bit
Args: ['/usr/local/bin/awslogs', 'get', 'help']
Config: `{'aws_access_key_id': 'SENSITIVE', 'aws_secret_access_key': 'SENSITIVE', 'aws_session_token': 'SENSITIVE', 'aws_profile': 'SENSITIVE', 'aws_region': None, 'aws_endpoint_url': None, 'log_group_name': 'help', 'log_stream_name': 'ALL', 'filter_pattern': None, 'watch': False, 'watch_interval': 1, 'output_group_enabled': True, 'output_stream_enabled': True, 'output_timestamp_enabled': False, 'output_ingestion_time_enabled': False, 'start': '5m', 'end': None, 'color': 'auto', 'query': None, 'func': 'list_logs'}`
```
Traceback (most recent call last):
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/awslogs/bin.py", line 175, in main
logs = AWSLogs(**vars(options))
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/awslogs/core.py", line 89, in __init__
self.client = boto3_client(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/awslogs/core.py", line 44, in boto3_client
return session.client(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/boto3/session.py", line 258, in client
return self._session.create_client(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/session.py", line 831, in create_client
client = client_creator.create_client(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/client.py", line 83, in create_client
client_args = self._get_client_args(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/client.py", line 285, in _get_client_args
return args_creator.get_client_args(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/args.py", line 99, in get_client_args
endpoint = endpoint_creator.create_endpoint(
File "/usr/local/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/endpoint.py", line 286, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: https://logs.US West (Oregon).amazonaws.com
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with awslogs/core.py, especially the boto3_client call shown in the traceback, and reproduce the reported `awslogs get help` command with the US West (Oregon) region. Trace how the region becomes the endpoint URL, then verify that the command works with the affected region and that the existing traceback no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100