aws-samples / service-screener-v2

A tool for customers to evaluate their AWS service configurations based on AWS and community best practices and receive recommendations on potential improvements.
Apache License 2.0
167 stars 46 forks source link

screener-v2 throws error when inspecting certain cloudfront distribution, S3 bucket #7

Closed vfchoo closed 7 months ago

vfchoo commented 1 year ago

Describe the bug screener-v2 throws error when inspecting certain cloudfront distribution, S3 bucket

To Reproduce

Error ... (S3Bucket) inspecting XXXXX Traceback (most recent call last): File "/home/cloudshell-user/screenerv2/service-screener-v2/services/Evaluator.py", line 27, in run getattr(self, method)() File "/home/cloudshell-user/screenerv2/service-screener-v2/services/lambda_/drivers/LambdaCommon.py", line 180, in _check_runtime runtime = self.lambda_['Runtime'] KeyError: 'Runtime

... (CloudFront::Distribution) inspecting XXX Traceback (most recent call last): File "/home/cloudshell-user/screenerv2/service-screener-v2/services/Evaluator.py", line 27, in run getattr(self, method)() File "/home/cloudshell-user/screenerv2/service-screener-v2/services/lambda_/drivers/LambdaCommon.py", line 180, in _check_runtime runtime = self.lambda_['Runtime'] KeyError: 'Runtime'

AWS CloudShell (please complete the following information):

kuettai commented 1 year ago

It seems like the error related to self.lambda_['Runtime'], do you happen to have the output.zip with you? Inside should have a file name: "error.txt". Can you paste the output of the error.txt here?

vfchoo commented 1 year ago

Unfortunately unable to as the script terminated with error after inspecting the resources. The error is in this issue #8

cykhoo0108 commented 1 year ago

Will try to simulate and fix this issue