My application is to use an link(url) to invoke lambda function ,then I want to know public IP of lambda and get page source. How could I get lambda public IP by using python? Thanks a lot.
You can curl to checkip.amazonaws.com
to get the public IP.
import requests
requests.get('http://checkip.amazonaws.com').text.rstrip()
Output:
52.x.147.64