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.
"CodeSigningConfig": {
            "AllowedPublishers": {
                "SigningProfileVersionArns": code_signing_obj.signing_profile_version_arns
            },
            "CodeSigningConfigArn": code_signing_obj.arn,
            "CodeSigningConfigId": code_signing_obj.id,
            "CodeSigningPolicies": {
                "UntrustedArtifactOnDeployment": code_signing_obj.untrusted_artifact_on_deployment
            },
            "Description": code_signing_obj.description,
            "LastModified": code_signing_obj.last_modified,
        }
    }
    return Response(json.dumps(result), status=200)
def validate_lambda_config():
    """Validates important config variables necessary for flawless lambda execution"""
    if (
        config.LAMBDA_DOCKER_NETWORK
        and config.is_in_docker
        and config.LAMBDA_DOCKER_NETWORK
        not in DOCKER_CLIENT.get_networks(get_main_container_name())
    ):
        LOG.warning(
            "Your specified LAMBDA_DOCKER_NETWORK '%s' is not connected to the main LocalStack container '%s'. "
            "Lambda functionality might be severely limited.",
            config.LAMBDA_DOCKER_NETWORK,
            get_main_container_name(),
        )
def serve(port):
    try: