jorgebastida / jorgebastida/awslogs

ECS frontend log issue - Solved ( region set required )

Open
#296 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5k
Forks
342
PR merge metrics
No merged PRs in 30d

Description

```Version: 0.11.0
Python: 3.6.10 (default, Feb 10 2020, 19:55:14)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
boto3 version: 1.12.26
Platform: Linux-4.14.171-105.231.amzn1.x86_64-x86_64-with-glibc2.3.4
Config: {'aws_access_key_id': 'SENSITIVE', 'aws_secret_access_key': 'SENSITIVE', 'aws_session_token': 'SENSITIVE', 'aws_profile': 'SENSITIVE', 'aws_region': '', 'log_group_prefix': 'ecsworkshop-frontend', 'func': 'list_groups'}
Args: ['/home/ec2-user/environment/.env/bin/awslogs', 'groups', '-p', 'ecsworkshop-frontend']

Traceback (most recent call last):
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/awslogs/bin.py", line 174, in main
logs = AWSLogs(**vars(options))
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/awslogs/core.py", line 89, in __init__
self.aws_region
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/awslogs/core.py", line 48, in boto3_client
region_name=aws_region)
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/botocore/session.py", line 835, in create_client
client_config=config, api_version=api_version)
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/botocore/client.py", line 85, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/botocore/client.py", line 287, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/botocore/args.py", line 107, in get_client_args
client_cert=new_config.client_cert)
File "/home/ec2-user/environment/.env/local/lib/python3.6/dist-packages/botocore/endpoint.py", line 261, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: https://logs..amazonaws.com

Contributor guide

No contributing guide indexed for this repository

Research direction

The traceback identifies awslogs/bin.py and awslogs/core.py, with an empty aws_region producing the invalid CloudWatch Logs endpoint. Start by reviewing the AWSLogs initialization and region handling; done would mean the command handles the missing-region case appropriately, but the issue itself records only that setting a region solved it.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.