I'm using Terraform to create an API Gateway and required Lambda Functions.

I do realize this might not be supported, and I can work around any limitations that Localstack might have, **But**, I have no idea how to debug the response I get from Terraform, and/or then dig into Localstack to see what is getting sent or returned.

If anyone has any guidance, suggestions, or examples they would greatly be appreciated.

-Patrick@Okta

`Error: Error applying plan:

1 error(s) occurred:

* aws_lambda_permission.apigw_lambda: 1 error(s) occurred:

* aws_lambda_permission.apigw_lambda: SerializationError: failed decoding JSON RPC response
caused by: unsupported JSON value (map[Id:LambdaFuncAccess-4bbef270 PolicyArn:arn:aws:iam::000000000000:policy/lambda_policy_terraformLambdaWebsite Statement:[map[Action:lambda:InvokeFunction Effect:Allow Resource:arn:aws:lambda:us-east-1:000000000000:function:terraformLambdaWebsite Sid:4bbef270]] Version:2012-10-17])`

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()