The update_function_configuration currently returns an empty dict no matter what but certain lambda libraries (ie, Zappa) require a realistic return value... which is simply the current config after being updated.

https://github.com/localstack/localstack/blob/9cba1010dfcbf2b7672df4d7da46b7e8ab287f64/localstack/services/awslambda/lambda_api.py#L872

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.update_function_configuration

There might also be some other magic enriching that result but my quick read-through looks like it's an empty dict.



<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->
log_messages = [e['message'] for e in log_events]
        for line in expected_lines:
            if '.*' in line:
                found = [re.match(line, m) for m in log_messages]
                if any(found):
                    continue
            self.assertIn(line, log_messages)
class TestLambdaBaseFeatures(unittest.TestCase):
    def test_forward_to_fallback_url_dynamodb(self):
        db_table = 'lambda-records'
        ddb_client = aws_stack.connect_to_service('dynamodb')
        def num_items():
            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_after, items_before + 3)
    def test_forward_to_fallback_url_http(self):
        class MyUpdateListener(ProxyListener):
            def forward_request(self, method, path, data, headers):
                records.append(data)
                return 200
        records = []
        local_port = get_free_tcp_port()
        proxy = start_proxy(local_port, backend_url=None, update_listener=MyUpdateListener())
        items_before = len(records)
        self._run_forward_to_fallback_url('%s://localhost:%s' % (get_service_protocol(), local_port))
        items_after = len(records)
        self.assertEqual(items_after, items_before + 3)
        proxy.stop()