localstack / localstack/serverless-localstack

Static API Gateway V1 Endpoints

オープン
#270 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

aws:apigateway status: backlog
主要言語
JavaScript
スター
542
フォーク
92
PR マージ指標
30日以内にマージされた PR はありません

説明

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 🙏

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

serverless.yml に示されているタグを使用して、localstack startsls deploy --stage local --config serverless.local.yml でデプロイメントを再現します。デプロイメント間で生成された API Gateway V1 エンドポイントを比較し、API 作成に関与するプラグインのエントリーポイントを調査します。要求された静的 URL がサポートされているかどうかを判断し、必要な動作を文書化または実装できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
api
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。