Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtaining a deployed API Gateway URL using awscli

I have an API that has been deployed in a stage in API Gateway. I am trying to get the URL of the deployed API using cli, but am having difficulties finding the command to do so. I have tried all the get- commands from the docs, found here:

https://docs.aws.amazon.com/cli/latest/reference/apigateway/index.html#cli-aws-apigateway

Even with the ID of the API, I can't get the actual URL that was deployed. Obviously I could just go to the console and copy it from there, but I was wondering if this was even possible from cli. Thanks.

like image 661
himi64 Avatar asked Aug 27 '18 19:08

himi64


People also ask

How do I find my API gateway URL?

You can find a REST API's root URL in the Stage Editor for the API in the API Gateway console. It's listed as the Invoke URL at the top. If the API's root resource exposes a GET method without requiring user authentication, you can call the method by clicking the Invoke URL link.

What is the URL for my AWS API gateway?

Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway . If this is your first time using API Gateway, you see a page that introduces you to the features of the service.

Which command is used when working with the Awscli?

To confirm the installation, use the aws –version command at a command prompt.


1 Answers

You might have to construct it.

https://<restApiId>.execute-api.<region>.amazonaws.com/<stageName>

like image 123
cementblocks Avatar answered Nov 15 '22 15:11

cementblocks