Static API Gateway V1 Endpoints

Open
#270 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
api

Research direction

Reproduce the deployment with localstack start and sls deploy --stage local --config serverless.local.yml, using the tags shown in serverless.yml. Compare the generated API Gateway V1 endpoint across deployments and inspect the plugin entry points involved in API creation. Done means determining whether the requested static URL is supported and documenting or implementing the required behavior.

Written by the indexing model from the issue text.

Description

aws:apigateway status: backlog

Hi team 👋

Context

My project is using localstack + severless.

I have my lambda function and I want to deploy to the localstack environment. After I deployed successfully, I find out that the endpoints (check screenshot below) is printing out in the stdout with a random rest-api-id (from the screenshot it is q7yho9op8e)
Screenshot 2024-11-08 at 11 24 14 AM

I cannot find a localstack-severless documentation to teach me how to have the static URL (since the above rest-api-id keep changing after each localstack deployment)

But I found this localstack doc, which provides a way to have the static URL by passing the tag 'custom_id ' to localstack api creation.
Screenshot 2024-11-08 at 11 25 46 AM

I also found that there is a way to pass the tag to the Api Gateway V1 by following this serverless doc
image

Test Process
  1. spin up the localstack by run command localstack start
  2. deploy the lambda to localstack by running sls deploy --stage local --config serverless.local.yml
  3. check endpoints from sls deploy stdout
Expected

I am expecting the api endpoint should looks like
http://localhost:4566/restapis/tagsMyId123/local/user_request or http://localhost:4566/restapis/stackTagsMyId123/local/user_request

Actual

As the result, the URL is still not static after deployment with tag set in the severless.yml (check screenshot below)
Screenshot 2024-11-08 at 11 30 13 AM

Questions:
  1. Does localstack-serverless plugin support the feature that mentioned in the localstack doc?
  2. Is there a way I can have the static URL since I need the static URL to run my e2e testing.

Many thanks 🙏

Dominant language
JavaScript
Stars
542
Forks
92
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.

More from localstack/serverless-localstack

All issues in localstack/serverless-localstack

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.