bref: Lambda Proxy Integration produces Execution failed due to configuration error: Malformed Lambda proxy response

It’s seems, that the AWS Lambda documentation is not 100% corrrect:

Output Format of a Lambda Function for Proxy Integration … The multiValueHeaders key can contain multi-value headers as well as single-value headers. You can use the multiValueHeaders key to specify all of your extra headers, including any single-value ones. …

but, they must be formated as multi values e.g. x-my-custom-header: ["Singel Value"], if the response contains the multiValueHeaders key, they must be provided as arrays of single values

This seems to be correct

multiValueHeaders: {
            "x-powered-by": ["PHP/7.4.0"],
            "cache-control": ["no-cache, private"],
            "date": ["Fri, 17 Jan 2020 17:18:01 GMT"],
            "content-type": ["application/json"],
            "x-ratelimit-limit": ["60"],
            "x-ratelimit-remaining": ["59"]
        }

but this doesn’t work

multiValueHeaders: {
            "x-powered-by": "PHP/7.4.0",
            "cache-control": ["no-cache, private"],
            "date": ["Fri, 17 Jan 2020 17:18:01 GMT"],
            "content-type": ["application/json"],
            "x-ratelimit-limit": ["60"],
            "x-ratelimit-remaining": ["59"]
        }

How can I force bref to use headers and not multiValueHeaders? This could be a dirty hotfix for me?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@gerdzhikov OK I’ve managed to reproduce this in another scenario. I will be pushing a fix at some point.

Thank you for reporting this.