Sorry I cannot find any info in other places.
Not yet, but it is on my roadmap!
now do you have some rough idea what the things stop it work in edge?
The input and output format should be the only thing. Shouldn't be a difficult change
super. I might give it shot first
@simon998yang see https://github.com/jgautheron/aws-serverless-express-edge
We should also add support for ALB https://aws.amazon.com/blogs/networking-and-content-delivery/lambda-functions-as-targets-for-application-load-balancers/
Hey @brettstack are you thinking something like this: https://github.com/awslabs/aws-serverless-express/blob/master/src/middleware.js#L12 except for parsing the ALB event, and using the same plumbing? This is huge for where I work given API Gateway isn't approved for most work, and our internal one has too much red tape.
So... it seems if we can jury rig the existing function to parse what API Gateway normally puts into headers, it should "just work" with what you have setup, ya?
Here's an example ALB event:
{
requestContext:
{
elb:
{ targetGroupArn: 'arn:aws:elasticloadbalancing:us-east-1:numberandstuff' }
},
httpMethod: 'GET',
path: '/user/exists/123',
queryStringParameters: { },
headers:
{
accept: '*/*',
'accept-encoding': 'gzip, deflate',
'cache-control': 'no-cache',
connection: 'Keep-Alive',
'content-length': '22',
'content-type': 'application/json',
host: 'internal-lambda-name-accountnum.us-east-1.elb.amazonaws.com',
'postman-token': 'uuid',
'user-agent': 'PostmanRuntime/7.6.0',
'x-amzn-trace-id': 'Root=1-datnum',
'x-forwarded-for': '0.0.0.0',
'x-forwarded-port': '80',
'x-forwarded-proto': 'http'
},
body: '{"sup": "man, a post"}',
isBase64Encoded: false
}
If you could give me an example of what API Gateway sends in those 2 headers, I could better visualize what the above needs to be turned into.
Looking at https://github.com/awslabs/aws-serverless-express/compare/master...jgautheron:master?w=1, the APIs are different enough that it will require some careful thought to be able to support both.
Coming in v4
Most helpful comment
We should also add support for ALB https://aws.amazon.com/blogs/networking-and-content-delivery/lambda-functions-as-targets-for-application-load-balancers/