diff --git a/checkov/common/bridgecrew/platform_integration.py b/checkov/common/bridgecrew/platform_integration.py index 336026d20f6..60211e26c54 100644 --- a/checkov/common/bridgecrew/platform_integration.py +++ b/checkov/common/bridgecrew/platform_integration.py @@ -902,11 +902,12 @@ def _persist_file(self, full_file_path: str, s3_file_key: str) -> None: sleep(SLEEP_SECONDS) curr_try += 1 else: - logging.error(f"failed to persist file {full_file_path} into S3 bucket {self.bucket}", - exc_info=True) + logging.error(f"failed to persist file {full_file_path} into S3 bucket {self.bucket}", exc_info=True) + logging.debug(f"file size of {full_file_path} is {os.stat(full_file_path).st_size} bytes") raise except Exception: logging.error(f"failed to persist file {full_file_path} into S3 bucket {self.bucket}", exc_info=True) + logging.debug(f"file size of {full_file_path} is {os.stat(full_file_path).st_size} bytes") raise if curr_try == tries: logging.error( diff --git a/checkov/common/bridgecrew/wrapper.py b/checkov/common/bridgecrew/wrapper.py index c69de1fa9e8..361d361969a 100644 --- a/checkov/common/bridgecrew/wrapper.py +++ b/checkov/common/bridgecrew/wrapper.py @@ -51,7 +51,7 @@ def _put_json_object(s3_client: S3Client, json_obj: Any, bucket: str, object_pat try: s3_client.put_object(Bucket=bucket, Key=object_path, Body=json.dumps(json_obj, cls=CustomJSONEncoder)) except Exception: - logging.error(f"failed to persist object into S3 bucket {bucket}", exc_info=log_stack_trace_on_error) + logging.error(f"failed to persist object into S3 bucket {bucket} - {object_path}", exc_info=log_stack_trace_on_error) raise