I'm writing a Lambda function that returns a response for Lambda Proxy Integration in Python. The API expects headers to be a dictionary.
{
    "isBase64Encoded": true|false,
    "statusCode": httpStatusCode,
    "headers": { "headerName": "headerValue", ... },
    "body": "..."
}
This requires each header field to be unique, so there is no way to use multiple Set-Cookie's.
I've already tried to convert the dictionary to a list of tuples
{
    "isBase64Encoded": true|false,
    "statusCode": httpStatusCode,
    "headers": [ ("headerName": "headerValue"), ... ],
    "body": "..."
}
but API gateway complains Malformed Lambda proxy response.
Any idea how to set headers with the same name?
 
    

 
    