【问题标题】:How to find endpoint URL of an API Gateway in AWS如何在 AWS 中查找 API 网关的端点 URL
【发布时间】:2020-07-04 08:57:38
【问题描述】:

我在 AWS 中制作了一些 API 网关。

此时,我想 curl 到每个 API 网关的端点以开始测试。但是,我找不到端点 URL:

例如,我通过 CLI 运行:

aws --profile dev apigateway get-rest-apis --output json

我得到:(没有端点 URL)

            "apiKeySource": "HEADER", 
            "description": "API one", 
            "endpointConfiguration": {
                "types": [
                    "REGIONAL"
                ]
            }, 
            "createdDate": 1570655986, 
            "policy": "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":\\\"*\\\",\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"arn:aws:FOOBAR\\/*\\/*\\/*\\\",\\\"Condition\\\":{\\\"IpAddress\\\":{\\\"aws:SourceIp\\\":[\\\"0.0.0.0\\/0\\\""]}}}]}", 
            "id": "foobar", 
            "name": "foobar"
        }

【问题讨论】:

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


    【解决方案1】:

    您必须部署 API。 然后您会在部署阶段找到 https 地址。 或者您可以使用自定义域名

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-16
      • 1970-01-01
      • 1970-01-01
      • 2023-01-04
      • 2019-08-19
      • 2018-12-27
      • 2022-01-27
      相关资源
      最近更新 更多