How do I find the API endpoint of a lambda function?

后端 未结 6 1571
有刺的猬
有刺的猬 2021-02-06 22:37

I have a Lambda function that has an exposed API Gateway endpoint, and I can get the URL for that via the AWS console. However, I would like to get that URL via API call. Neithe

6条回答
  •  鱼传尺愫
    2021-02-06 22:55

    Your API Gateway endpoint URL doesn't get exposed via an API call. However, since the URL of the API follows a certain structure, you could get all the necessary pieces and create the URI within your code.

    https://API-ID.execute-api.REGION.amazonaws.com/STAGE

    You could use apigateway:rest-apis to get your API-ID and restapi:stages to get the stage corresponding identifier.

提交回复
热议问题