Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions python/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,19 +387,21 @@ def zip_directory(variables: dict) -> Set[int]:
zip_size / BYTES_PER_MB,
variables['max_lambda_size'] / BYTES_PER_MB
)

if variables['fail_on_too_big'] and zip_size > variables['max_lambda_size']:
LOGGER.info(
"\n==========================================================================\n"
"ERROR - Lambda: %s is to big to fit in a lambda. \n"
"Please remove some packages.\n"
"Current size: %sB - Max Size: %sB\n"
"==========================================================================\n",
split(variables['artifact_path'])[1], zip_size, variables['max_lambda_size'])
error_codes.add(1)

except Exception: # pylint: disable=broad-except
LOGGER.exception("Zipping package failed:")
error_codes.add(1)

if variables['fail_on_too_big'] and zip_size > variables['max_lambda_size']:
LOGGER.info(
"\n==========================================================================\n"
"ERROR - Lambda: %s is to big to fit in a lambda. \n"
"Please remove some packages.\n"
"Current size: %sB - Max Size: %sB\n"
"==========================================================================\n",
split(variables['artifact_path'])[1], zip_size, variables['max_lambda_size'])
error_codes.add(1)

return error_codes

Expand Down