Lambda-proxy example

Hi,
How can I configure in serverless.yml these endpoints by using lambda-proxy integration?

POST /v1/users/{user_id}
POST /v1/users/{user_id}/purchase

I’m confused because on the amazon web console the configuration would be
/v1/users/{proxy+} (POST) but I don’t know how to deal with purchase resource neither if I must set the “greedy param” {proxy+} in serverless.yml.

An example would be appreciated :slight_smile:
Thank you in advance!

3 Likes

was just wondering the same question, you make any progress on this?

hey @contractorwolf!
Unfortunately, no.
We are currently developing and have no time to research on this. It is on my ‘pending tasks’.
I hope someone could explain this in order to make a try…

functions:
  generic:
    handler: handler.generic
    events:
      - http: ANY {proxy+}
1 Like

excellent, {proxy+} was exactly what I was looking for.

Maybe we could ask to have this included in the api gateway documentation

2 Likes

That sounds like a great idea @jkristia, feel free to submit a PR on the relevant docs page.