dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 166 forks source link

aws: handling if used via new API Gateway v2 (i.e. HTTP-API) with in combination with a stage #143

Closed adrai closed 4 years ago

adrai commented 4 years ago

Seems like the new API Gateway v2 (i.e. when using HTTP-API) does send a different event payload when used with a dedicated api stage.

The "old" API Gateway sends it like this:

{
  httpMethod: 'GET',
  path: '/test',
  headers: {
    'X-My-Header': 'wuuusaaa'
  },
  requestContext: {
  }
}

The "new" API Gateway sends it like this:

{
  httpMethod: 'GET',
  path: '/dev/test',
  headers: {
    'X-My-Header': 'wuuusaaa'
  },
  requestContext: {
    resourcePath: '/test',
    stage: 'dev'
  }
}

compare the path value

dougmoscrop commented 4 years ago

Hey! I will support this, I am just super busy

adrai commented 4 years ago

I closed it because aws changed the http-api request format further.

On 13 Mar 2020, at 00:43, Doug Moscrop notifications@github.com wrote:



Hey! I will support this, I am just super busy

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/dougmoscrop/serverless-http/pull/143#issuecomment-598481292, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIJF4TSGPKHB37UMEVAU5TRHFYLXANCNFSM4LCEEE7A.