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])`

result_data = result['Payload'].read()
        self.assertEqual(result['StatusCode'], 200)
        self.assertDictEqual(
            json.loads(to_str(result_data)),
            {'validated': True, 'bucket': 'test_bucket', 'key': 'test_key'}
        )
class TestDockerBehaviour(LambdaTestBase):
    @classmethod
    def setUpClass(cls):
        cls.lambda_client = aws_stack.connect_to_service('lambda')
    def test_prime_and_destroy_containers(self):
        
        if not isinstance(lambda_api.LAMBDA_EXECUTOR,
                          lambda_executors.LambdaExecutorReuseContainers):
            return
        executor = lambda_api.LAMBDA_EXECUTOR
        func_name = 'test_prime_and_destroy_containers'
        func_arn = lambda_api.func_arn(func_name)
        
        executor.cleanup()
        self.assertEqual(len(executor.get_all_container_names()), 0)
        
        zip_file = testutil.create_lambda_archive(
            load_file(TEST_LAMBDA_ENV),
            get_content=True,
            libs=TEST_LAMBDA_LIBS,
            runtime=LAMBDA_RUNTIME_PYTHON27
        )
        testutil.create_lambda_function(
            func_name=func_name,