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.
import os
from io import BytesIO
import pytest
from localstack.services.awslambda.lambda_api import LAMBDA_DEFAULT_HANDLER
from localstack.services.awslambda.lambda_utils import LAMBDA_RUNTIME_PYTHON37
from localstack.utils import testutil
from localstack.utils.common import short_uid
THIS_FOLDER = os.path.dirname(os.path.realpath(__file__))
TEST_LAMBDA_PYTHON_ECHO = os.path.join(THIS_FOLDER, "functions", "lambda_echo.py")
FUNCTION_MAX_UNZIPPED_SIZE = 262144000
def generate_sized_python_str(size):