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.
region = LambdaRegion.get()
    for i, m in enumerate(region.event_source_mappings):
        if uuid_value == m["UUID"]:
            return region.event_source_mappings.pop(i)
    return {}
@synchronized(lock=EXEC_MUTEX)
def use_docker():
    global DO_USE_DOCKER
    if DO_USE_DOCKER is None:
        DO_USE_DOCKER = False
        if "docker" in get_executor_mode():
            has_docker = DOCKER_CLIENT.has_docker()
            if not has_docker:
                LOG.warning(
                    (
                        "Lambda executor configured as LAMBDA_EXECUTOR=%s but Docker "
                        "is not accessible. Please make sure to mount the Docker socket "
                        "/var/run/docker.sock into the container."
                    ),
                    get_executor_mode(),
                )
            DO_USE_DOCKER = has_docker
    return DO_USE_DOCKER
def fix_proxy_path_params(path_params):
    proxy_path_param_value = path_params.get("proxy+")
    if not proxy_path_param_value:
        return
    del path_params["proxy+"]
    path_params["proxy"] = proxy_path_param_value
def message_attributes_to_lower(message_attrs):