While a lambda is still processing (archive unpacking etc), the lambda state should be set to "Pending" (currently "Active") and invocations to that lambda should fail (currently, it can end up in a inconsistent state in this case, like lambdas being executed without layers).

Lambda state should reflect the current internal state, and invocations should fail if not active.
if not msg:
        msg = "The resource you requested does not exist."
        if ref:
            msg = "%s not found: %s" % (
                "Function" if ":function:" in ref else "Resource",
                ref,
            )
    return error_response(msg, 404, error_type="ResourceNotFoundException")
def delete_lambda_function(function_name: str) -> Dict[None, None]:
    arn = func_arn(function_name)
    region = LambdaRegion.get()
    
    LAMBDA_EXECUTOR.cleanup(arn)
    try:
        region.lambdas.pop(arn)
    except KeyError:
        raise ResourceNotFoundException(
            f"Unable to delete non-existing Lambda function {func_arn(function_name)}"
        )
    event_publisher.fire_event(
        event_publisher.EVENT_LAMBDA_DELETE_FUNC,