awslogs
awslogs copied to clipboard
Stacktrace on using --aws_region="eu-west-1"
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
I think I'm hitting the same thing?
`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.9.4 (default, Apr 4 2021, 17:42:23) [Clang 12.0.0 (clang-1200.0.32.29)] boto3 version: 1.14.20 Platform: macOS-11.2.3-arm64-arm-64bit Args: ['/opt/homebrew/bin/awslogs', '--profile=profile', '--region=us-west-2'] Config: {'aws_access_key_id': 'SENSITIVE', 'aws_secret_access_key': 'SENSITIVE', 'aws_session_token': 'SENSITIVE', 'aws_profile': 'SENSITIVE'}
Traceback (most recent call last): File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/awslogs/bin.py", line 175, in main logs = AWSLogs(**vars(options)) File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/awslogs/core.py", line 89, in init self.client = boto3_client( File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/awslogs/core.py", line 44, in boto3_client return session.client( File "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/args.py", line 71, in get_client_args final_args = self.compute_client_args( File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/args.py", line 147, in compute_client_args endpoint_config = self._compute_endpoint_config( File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/args.py", line 218, in _compute_endpoint_config return self._resolve_endpoint(**resolve_endpoint_kwargs) File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/args.py", line 300, in _resolve_endpoint return endpoint_bridge.resolve( File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/client.py", line 360, in resolve resolved = self.endpoint_resolver.construct_endpoint( File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/regions.py", line 133, in construct_endpoint result = self._endpoint_for_partition( File "/opt/homebrew/Cellar/awslogs/0.14.0_1/libexec/lib/python3.9/site-packages/botocore/regions.py", line 148, in _endpoint_for_partition raise NoRegionError() botocore.exceptions.NoRegionError: You must specify a region.`
Hi @rawrgulmuffins @Blake-
You should use awslogs --aws-region
instead of --aws_region or --region