runway.cfngin.hooks.awslambda.exceptions module

Exceptions for awslambda hooks.

exception runway.cfngin.hooks.awslambda.exceptions.DeploymentPackageEmptyError[source]

Bases: runway.cfngin.exceptions.CfnginError

Deployment package is empty.

This can be caused by an incorrect source code directory or a gitignore rule unintentionally ignoring all source code.

Any empty deployment package is determined by checking the size of the archive file. If the size is <=22 (the size a zip file End of Central Directory Record) it has no contents.

__init__(archive_file: Path) None[source]

Instantiate class.

Parameters

archive_file – The empty archive file.

archive_file: Path

The deployment package archive file.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.cfngin.hooks.awslambda.exceptions.RuntimeMismatchError[source]

Bases: runway.cfngin.exceptions.CfnginError

Required runtime does not match the detected runtime.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__init__(expected_runtime: str, detected_runtime: str) None[source]

Instantiate class.

Parameters
  • expected_runtime – Explicitly defined runtime that was expected.

  • detected_runtime – Runtime detected on the build system.

detected_runtime: str

Runtime detected on the build system.

expected_runtime: str

Explicitly defined runtime that was expected.