terraform.aws-baseline-infra/examples/lambda-layers/function.py

11 lines
258 B
Python
Raw Permalink Normal View History

# reference: https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-eventbridge/
import requests
def lambda_handler(event, context):
r = requests.get('https://ipinfo.io/')
return {
"HttpResponseCode": r.status_code
}