lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

Api Versioning

Open thiagotigaz opened this issue 5 years ago • 2 comments

Hey Jeremy,

This is more a question than a problem. I'm trying to implement api versioning based on path but then I need to change the lambda-api configuration to use the base property with v1, v2, etc...

Right now we are configuring the custom domain names in the api gateway like the following: example-dev.example.com/v1 example-dev.example.com/v2

Each domain points to a different lambda function on a different cloudformation stack, we are not using the available stages on Api Gateway we always use Prod and have one cloudformation stack per environment.

I noticed on the lambda-api code that you parse the request using event's path property which includes the v1 from the custom domain mapping. Is there any option to use the resource property instead(resource property doesn't include mapping, so no v1 on it), in this case I don't need to use base property on the framework config and I can have it working on all my stacks, no matter which version.

I'm open to suggestions, maybe we are not doing the best way. What do you recommend.

thiagotigaz avatar May 28 '20 22:05 thiagotigaz

@thiagotigaz Hi there,

Have you managed to implement the path based API versioning?

If so, I would like to know a bit more about your approach to it. I have somewhat similar requirements as you mentioned.

Thanks in advance!

Anwaar

ahperlego avatar Oct 01 '21 10:10 ahperlego

@jeremydaly @thiagotigaz @ahperlego

Hi there,

did you find any solution for this problem? I'm having this problem with apigateway Rest API. Apigateway HTTP v2 API does not have any problems like this.

Thanks in advance!

Salih

salihoglu87 avatar Mar 08 '23 18:03 salihoglu87