Zappa icon indicating copy to clipboard operation
Zappa copied to clipboard

[Migrated] ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the DescribeLogStreams

Open jneves opened this issue 4 years ago • 1 comments

Originally from: https://github.com/Miserlou/Zappa/issues/1652 by 4lph4-Ph4un

When attempting to tail logs on dev the tailing is succesfull, however tailing environment on another account fails with:

Traceback (most recent call last):
  File "/opt/kidday/env/lib/python3.6/site-packages/zappa/cli.py", line 2693, in handle
    sys.exit(cli.handle())
  File "/opt/kidday/env/lib/python3.6/site-packages/zappa/cli.py", line 504, in handle
    self.dispatch_command(self.command, stage)
  File "/opt/kidday/env/lib/python3.6/site-packages/zappa/cli.py", line 595, in dispatch_command
    force_colorize=self.vargs['force_color'] or None,
  File "/opt/kidday/env/lib/python3.6/site-packages/zappa/cli.py", line 1064, in tail
    filter_pattern=filter_pattern,
  File "/opt/kidday/env/lib/python3.6/site-packages/zappa/core.py", line 2745, in fetch_logs
    orderBy='LastEventTime'
  File "/opt/kidday/env/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/kidday/env/lib/python3.6/site-packages/botocore/client.py", line 623, 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.

Checking the deployment with status (zappa status prod) yields:

No Lambda src-prod detected in eu-west-1 - have you deployed yet?

Although the deployment has been succesful and the Lambda name can be found on AWS console itself.

Possible Fix

Send in jneves! :D

jneves avatar Feb 20 '21 12:02 jneves

I had this same issue. For me, my Lambda's role did not have the AWSLambdaBasicExecutionRole policy attached. Zappa needs permission to create the log group. After attaching the policy, I did a zappa update my-env and all was resolved.

medaglia avatar Feb 02 '22 20:02 medaglia

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

github-actions[bot] avatar Apr 03 '24 15:04 github-actions[bot]

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.

github-actions[bot] avatar Apr 13 '24 17:04 github-actions[bot]