jorgebastida / jorgebastida/awslogs

ResourceNotFoundException for seemingly every get call?

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

Description

`awslogs get --region us-east-1 /aws/lambda/us-east-1.nameofmyfunction`

```
Traceback (most recent call last):
File "/usr/local/bin/awslogs", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/awslogs/bin.py", line 172, in main
getattr(logs, options.func)()
File "/usr/local/lib/python2.7/site-packages/awslogs/core.py", line 76, in list_logs
streams = list(self._get_streams_from_pattern(self.log_group_name, self.log_stream_name))
File "/usr/local/lib/python2.7/site-packages/awslogs/core.py", line 69, in _get_streams_from_pattern
for stream in self.get_streams(group):
File "/usr/local/lib/python2.7/site-packages/awslogs/core.py", line 228, in get_streams
for page in paginator.paginate(**kwargs):
File "/usr/local/lib/python2.7/site-packages/botocore/paginate.py", line 255, in __iter__
response = self._make_request(current_kwargs)
File "/usr/local/lib/python2.7/site-packages/botocore/paginate.py", line 332, in _make_request
return self._method(**current_kwargs)
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 314, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 612, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the DescribeLogStreams operation: The specified log group does not exist.
```

I get this same error no matter what logs I seem to call.

On:
macOS 10.13.6
pip 10.0.1
Python 2.7.15

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported awslogs command and follow the traceback through awslogs/core.py, especially list_logs, _get_streams_from_pattern, and get_streams. Check how the log group name is passed to DescribeLogStreams and compare the observed behavior with the reported ResourceNotFoundException; done means the command handles or explains this case correctly.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.