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.
return len((run_safe(ddb_client.scan, TableName=db_table) or {"Items": []})["Items"])
        items_before = num_items()
        self._run_forward_to_fallback_url("dynamodb://%s" % db_table)
        items_after = num_items()
        self.assertEqual(items_before + 3, items_after)
    def test_forward_to_fallback_url_http(self):
        class MyUpdateListener(ProxyListener):
            def forward_request(self, method, path, data, headers):
                records.append({"data": data, "headers": headers, "method": method, "path": path})
                return lambda_result
        lambda_result = {"result": "test123"}
        local_port = get_free_tcp_port()
        proxy = start_proxy(local_port, backend_url=None, update_listener=MyUpdateListener())
        local_url = "%s://localhost:%s" % (get_service_protocol(), local_port)
        
        records = []
        self._run_forward_to_fallback_url(local_url)
        items_after = len(records)
        for record in records:
            self.assertIn("non-existing-lambda", record["headers"]["lambda-function-name"])
        self.assertEqual(3, items_after)
        
        lambda_name = "test-%s" % short_uid()
        testutil.create_lambda_function(
            handler_file=TEST_LAMBDA_PYTHON,
            func_name=lambda_name,
            libs=TEST_LAMBDA_LIBS,
        )
        
        records = []