mlevit / aws-auto-cleanup

Programmatically delete AWS resources based on an allowlist and time to live (TTL) settings
MIT License
496 stars 55 forks source link

[ERROR] Could not generate resource tree. (lambda_handler.py, build_tree(), line 352) #40

Closed andreirymar closed 3 years ago

andreirymar commented 4 years ago

Everything runs Okay but at the end resource tree cannot be created and copied to s3 bucket. See last lines I see in Lambda function output.

[INFO] Auto Cleanup completed. (lambda_handler.py, run_cleanup(), line 168) 00:40:31 [ERROR] Could not generate resource tree. (lambda_handler.py, build_tree(), line 352) 00:40:31 [ERROR] invalid syntax (_base.py, line 414) (lambda_handler.py, build_tree(), line 353) 00:40:31 END RequestId: 4d42e55b-b159-4524-bf4e-148447aa73ac

mlevit commented 4 years ago

@andreirymar can you head into CloudWatch for this run and send through the logs? Remove anything private from there. I'd like to see where exactly it failed.

andreirymar commented 4 years ago

Here's complete output from CloudWatch in attached file.

CloudWatch logs for AutoCleanup.txt

mlevit commented 4 years ago

Thanks for that @andreirymar. It looks like you're getting the same error as another user was. I just merged a fixed in #41 that hopefully should fix the DynamoDB error. Could you pull the latest changes and try running it again.

It might not fix the tree building issue, but at least it'll get rid of one of them.

andreirymar commented 4 years ago

I think it made it even worse. After I removed everything and did a clean get and deploy, even the first run fails, see attached error logs. CloudWatch logs for AutoCleanup March-7-2020.txt