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

@app.route('%s/functions/<function>/versions' % PATH_ROOT, methods=['GET'])
def list_versions(function):
    arn = func_arn(function)
    if arn not in arn_to_lambda:
        return not_found_error(arn)
    return jsonify({'Versions': do_list_versions(arn)})
@app.route('%s/functions/<function>/aliases' % PATH_ROOT, methods=['POST'])
def create_alias(function):
    arn = func_arn(function)
    if arn not in arn_to_lambda:
        return not_found_error(arn)
    data = json.loads(request.data)
    alias = data.get('Name')
    if alias in arn_to_lambda.get(arn).aliases:
        return error_response('Alias already exists: %s' % arn + ':' + alias, 404,
                              error_type='ResourceConflictException')
    version = data.get('FunctionVersion')
    description = data.get('Description')
    return jsonify(do_update_alias(arn, alias, version, description))
@app.route('%s/functions/<function>/aliases/<name>' % PATH_ROOT, methods=['PUT'])
def update_alias(function, name):
    arn = func_arn(function)
    if arn not in arn_to_lambda:
        return not_found_error(arn)
    if name not in arn_to_lambda.get(arn).aliases:
        return not_found_error(msg='Alias not found: %s:%s' % (arn, name))
    current_alias = arn_to_lambda.get(arn).aliases.get(name)
    data = json.loads(request.data)
    version = data.get('FunctionVersion') or current_alias.get('FunctionVersion')
    description = data.get('Description') or current_alias.get('Description')