runway.cfngin.hooks.awslambda package

Hooks for AWS Lambda.

class runway.cfngin.hooks.awslambda.PythonFunction[source]

Bases: runway.cfngin.hooks.awslambda.base_classes.AwsLambdaHook[runway.cfngin.hooks.awslambda.python_requirements._project.PythonProject]

Hook for creating an AWS Lambda Function using Python runtime.

BUILD_LAYER: ClassVar[bool] = False

Flag to denote that this hook creates a Lambda Function deployment package.

__init__(context: runway.context.CfnginContext, **kwargs: Any) None[source]

Instantiate class.

args: PythonHookArgs

Parsed hook arguments.

property deployment_package: DeploymentPackage[PythonProject]

AWS Lambda deployment package.

property project: runway.cfngin.hooks.awslambda.python_requirements._project.PythonProject

Project being deployed as an AWS Lambda Function.

cleanup() None[source]

Cleanup after execution.

cleanup_on_error() None[source]

Cleanup after an error has occurred.

__new__(**kwargs)
build_response(stage: Literal['deploy', 'destroy', 'plan']) Optional[BaseModel]

Build response object that will be returned by this hook.

Parameters

stage – The current stage being executed by the hook.

plan() AwsLambdaHookDeployResponseTypedDict

Run during the plan stage.

post_deploy() Any

Run during the post_deploy stage.

post_destroy() Any

Run during the post_destroy stage.

pre_deploy() Any[source]

Run during the pre_deploy stage.

pre_destroy() Any

Run during the pre_destroy stage.

ctx: CfnginContext

CFNgin context object.

class runway.cfngin.hooks.awslambda.PythonLayer[source]

Bases: runway.cfngin.hooks.awslambda._python_hooks.PythonFunction

Hook for creating an AWS Lambda Layer using Python runtime.

__init__(context: runway.context.CfnginContext, **kwargs: Any) None

Instantiate class.

__new__(**kwargs)
build_response(stage: Literal['deploy', 'destroy', 'plan']) Optional[BaseModel]

Build response object that will be returned by this hook.

Parameters

stage – The current stage being executed by the hook.

cleanup() None

Cleanup after execution.

cleanup_on_error() None

Cleanup after an error has occurred.

property deployment_package: DeploymentPackage[PythonProject]

AWS Lambda deployment package.

plan() AwsLambdaHookDeployResponseTypedDict

Run during the plan stage.

post_deploy() Any

Run during the post_deploy stage.

post_destroy() Any

Run during the post_destroy stage.

pre_deploy() Any

Run during the pre_deploy stage.

pre_destroy() Any

Run during the pre_destroy stage.

property project: runway.cfngin.hooks.awslambda.python_requirements._project.PythonProject

Project being deployed as an AWS Lambda Function.

args: PythonHookArgs

Parsed hook arguments.

BUILD_LAYER: ClassVar[bool] = True

Flag to denote that this hook creates a Lambda Layer deployment package.

Subpackages

Submodules