jorgebastida / jorgebastida/awslogs

awslogs extra . separator causing Invalid endpoint

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

Description

Working in Cloud9 from tutorial on ecsworkshop.com, awslogs groups -p ecsworkshop-nodejs

dhull:~/environment/ecsdemo-nodejs/cdk (master) $ log_group=$(awslogs groups -p ecsworkshop-nodejs)

You've found a bug! Please, raise an issue attaching the following traceback
https://github.com/jorgebastida/awslogs/issues/new

```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-nodejs', 'func': 'list_groups'}
Args: ['/home/ec2-user/environment/.env/bin/awslogs', 'groups', '-p', 'ecsworkshop-nodejs']

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

Reproduce `awslogs groups -p ecsworkshop-nodejs` in the reported Cloud9 setup, then inspect `awslogs/bin.py` and `awslogs/core.py` around option handling and `boto3_client`. Confirm the command no longer produces the invalid endpoint and successfully lists groups when the AWS region is configured.

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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.