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.
"AliasArn": lambda_api.func_arn(self.FUNCTION_NAME) + ":" + self.ALIAS_NAME,
                    "FunctionVersion": "1",
                    "Name": self.ALIAS_NAME,
                    "Description": self.ALIAS_NAME,
                },
                {
                    "AliasArn": lambda_api.func_arn(self.FUNCTION_NAME) + ":" + self.ALIAS2_NAME,
                    "FunctionVersion": "$LATEST",
                    "Name": self.ALIAS2_NAME,
                    "Description": "",
                },
            ]
        }
        self.assertDictEqual(expected_result, result)
    def test_list_non_existant_function_aliases_returns_error(self):
        with self.app.test_request_context():
            result = json.loads(lambda_api.list_aliases(self.FUNCTION_NAME).get_data())
            self.assertEqual(self.RESOURCENOTFOUND_EXCEPTION, result["__type"])
            self.assertEqual(
                self.RESOURCENOTFOUND_MESSAGE % lambda_api.func_arn(self.FUNCTION_NAME),
                result["message"],
            )
    def test_get_container_name(self):
        executor = lambda_executors.EXECUTOR_CONTAINERS_REUSE
        name = executor.get_container_name(aws_stack.lambda_function_arn("my_function_name"))
        self.assertIn(
            f"_lambda_arn_aws_lambda_{aws_stack.get_region()}_{get_aws_account_id()}_function_my_function_name",
            name,
        )
    def test_concurrency(self):