localstack / localstack/serverless-localstack
Static API Gateway V1 Endpoints
還沒有人認領這個 Issue。
- 主要語言
- 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**)
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](https://docs.localstack.cloud/user-guide/aws/apigateway/), which provides a way to have the static URL by passing the tag '_custom_id_ ' to localstack api creation.

I also found that there is a way to pass the tag to the Api Gateway V1 by following this [serverless doc](https://www.serverless.com/framework/docs/providers/aws/events/apigateway#tags--stack-tags)

### 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)
### Questions:
1. Does localstack-serverless plugin support the feature that mentioned in the localstack doc?
5. Is there a way I can have the static URL since I need the static URL to run my e2e testing.
Many thanks 🙏
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
使用 `serverless.yml` 中顯示的標籤,透過 `localstack start` 和 `sls deploy --stage local --config serverless.local.yml` 重現部署。比較各次部署中產生的 API Gateway V1 端點,並檢查參與 API 建立的 plugin entry points。完成的標準是確定所要求的靜態 URL 是否受支援,並記錄或實作所需的行為。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- api
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100