AWS Lambda http, where do I find the URL?

Amazon Web-ServicesAws LambdaServerless Framework

Amazon Web-Services Problem Overview


I am fairly new to AWS Lambda but sure can see the benefits of it and stumbled upon the superb framework Serverless to help me built solutions on Lambda.

I started out building solutions using AWS API Gateway but really need "internal" VPC API's and not public Internet facing API's like API GW creates.

I found that Servless indeed can expose a HTTP endpoint but I can't figure out how this is done and how the URL is created. When I deploy the Lambda from Serverless it gives me the URL, e.g.:

https://uxezd6ry8z.execute-api.eu-west-1.amazonaws.com/dev/ping

I would like to be able to find (or create) this same http listener for already existing Lambdas so my question is how is the URL created and where is teh actual HTTP listener deployed?

Amazon Web-Services Solutions


Solution 1 - Amazon Web-Services

You might be looking for the invoke url,

  1. go to https://console.aws.amazon.com/apigateway<br><br>
  2. select api link (which you have deployed on aws lambda).
    enter image description here

  3. select stages in left side panel and see the invoke url.

Solution 2 - Amazon Web-Services

Adding a http listener can be done by going to your lambda function, selecting the 'triggers' tab and 'add trigger', finally selecting API Gateway - but as others mentioned this does create a public facing url.

adding api gateway as a trigger will give you a url to an existing lambda

Solution 3 - Amazon Web-Services

Duh, I was in the wrong AWS logon previously so the API GW was not showing any matching Serverless API and that was why I couldn't understand how they did it...

Once I logged into the AWS account that hosts the Serverless structure I can see the API GW GET API's for the Serverless HTTP listener.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAndersView Question on Stackoverflow
Solution 1 - Amazon Web-Servicesbhargav patelView Answer on Stackoverflow
Solution 2 - Amazon Web-ServicesAlexView Answer on Stackoverflow
Solution 3 - Amazon Web-ServicesAndersView Answer on Stackoverflow