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 创建的插件入口点。完成的标准是确定所请求的静态 URL 是否受支持,并记录或实现所需的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- api
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100