Core
encode_kwargs
encode_kwargs(**kwargs: Any) -> str
Compress and encode a kwarg blob for the validation client.
lambda_cleanup
lambda_cleanup(func: Callable[[LambdaEventParameters, object, PipelineNetworkConfig, dict[str, str], _CleanupDict], YAMLString]) -> Callable[[LambdaEventParameters, object], YAMLString]
Exists to avoid wrapping the whole body of main() in an ugly
try-except-finally block. Basically goto cleanup
load_kwargs
load_kwargs(kwargblob: str) -> LambdaEventParameters
Load the encoded and compressed kwarg blob.
main
main(event: LambdaEventParameters, _context: object, netconf: PipelineNetworkConfig, tags: dict[str, str], cleanup_dict: _CleanupDict) -> YAMLString
Entrypoint for upload init lambda.
read_task_config
read_task_config(event: LambdaEventParameters, netconf_params: PipelineNetworkConfig) -> tuple[TaskConfig | None, str | None]
Read a task configuration from the configuration bucket. If no special config exists for this dataset, just read the default config; otherwise, use anything in this dataset's config as overrides for the default config.
Returns:
-
config(TaskConfig | None) –TaskConfig if config(s) were found and parsed correctly; None otherwise
-
exception_message(str | None) –str if config(s) weren't found and parsed correctly, None otherwise
run_validation_task
run_validation_task(dataset: str, delivery_id: str, transfer_type: TransferType, tags: dict[str, str], config: TaskConfig) -> dict
Run the validation task on Fargate.
See boto3 docs for a more detailed definition of the return type: https://docs.aws.amazon.com/boto3/latest/reference/services/ecs/client/run_task.html