amazon-web-services - AWS API Gateway 按请求正文路由

标签 amazon-web-services aws-api-gateway

是否有任何解决方案可以让 AWS API Gateway 根据 HTTP 请求正文的数据进行路由,而不使用任何其他 AWS 服务 lambda 等? (我的HTTP请求体只包含环境ID)

我创建了一个解决方案,其中另一个 AWS 服务帮助处理 body 数据。如果可能的话,我正在寻找在这种情况下仅使用 AWS API Gateway 的解决方案。提前感谢您的帮助!

最佳答案

仅使用 API Gateway 无法根据请求正文中的数据进行路由。

您可以使用路径和查询字符串参数进行路由。

参见Working with routes for HTTP APIs

API Gateway selects the route with the most-specific match, using the following priorities:

Full match for a route and method

Match for a route and method with a greedy path variable

The default route

关于amazon-web-services - AWS API Gateway 按请求正文路由,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75107526/

相关文章:

amazon-web-services - SQS - 交货延迟 30 分钟

amazon-web-services - AWS API 网关中的 OpenID 身份验证

node.js - 获取API网关传递的Lambda(Nodejs)中的url参数

amazon-web-services - 由于配置错误 : General SSLEngine 导致执行失败

amazon-web-services - terraform 生成文件、zip 并上传到 s3

python - 在 AWS (lambda) 上安装 python-Levenshtein 以加速 fuzzywuzzy

node.js - 在 AWS Ubuntu 实例中为 NodeJS 部署设置 GitLab CI

linux - 在 AWS Amazon Linux 上安装 MongoDB 时出错

amazon-web-services - 从通过 Cognito 生成的授权 token 识别 AWS Lambda 中的用户

amazon-web-services - AWS api 网关将不允许自定义域名关联到证书