jeremydaly / jeremydaly/lambda-api

Api Versioning

Open
#153 2 comments 1 reaction 1 assignee View on GitHub

@naorpeled is already working on this.

Since May 4, 2024.

Dominant language
JavaScript
Stars
1.5k
Forks
127
Avg merge
31m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.