localstack / localstack/serverless-localstack

Static API Gateway V1 Endpoints

Abierto
#270 0 comentarios 3 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

aws:apigateway status: backlog
Lenguaje dominante
JavaScript
Estrellas
542
Forks
92
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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 🙏

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduce el deployment con localstack start y sls deploy --stage local --config serverless.local.yml, usando los tags mostrados en serverless.yml. Compara el endpoint de API Gateway V1 generado entre los distintos deployments e inspecciona los puntos de entrada del plugin implicados en la creación de la API. Se considera terminado cuando se haya determinado si se admite la URL estática solicitada y se haya documentado o implementado el comportamiento necesario.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
api
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.