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.
self.assertEqual(
                self.RESOURCENOTFOUND_MESSAGE % lambda_api.func_arn("non_existent_function_name"),
                result["message"],
            )
    def test_get_function_single_function_returns_correect_function(self):
        with self.app.test_request_context():
            self._create_function("myFunction")
            result = json.loads(lambda_api.get_function("myFunction").get_data())
            self.assertEqual(
                result["Configuration"]["FunctionArn"],
                aws_stack.lambda_function_arn("myFunction"),
            )
    def test_get_function_two_functions_with_similar_names_match_by_name(self):
        with self.app.test_request_context():
            self._create_function("myFunctions")
            self._create_function("myFunction")
            result = json.loads(lambda_api.get_function("myFunction").get_data())
            self.assertEqual(
                result["Configuration"]["FunctionArn"],
                aws_stack.lambda_function_arn("myFunction"),
            )
            result = json.loads(lambda_api.get_function("myFunctions").get_data())
            self.assertEqual(
                result["Configuration"]["FunctionArn"], aws_stack.lambda_function_arn("myFunctions")
            )
    def test_get_function_two_functions_with_similar_names_match_by_arn(self):
        with self.app.test_request_context():
            self._create_function("myFunctions")
            self._create_function("myFunction")
            result = json.loads(