Skip to content

Instantly share code, notes, and snippets.

@thiagomgo
Created November 1, 2016 19:13
Show Gist options
  • Save thiagomgo/7f738b8d89a537ba1aa4d97d90b17c28 to your computer and use it in GitHub Desktop.
Save thiagomgo/7f738b8d89a537ba1aa4d97d90b17c28 to your computer and use it in GitHub Desktop.
A simple lambda function written in python to execute a curl command
def lambda_handler(event, context):
import subprocess
result = subprocess.call("curl -I http://foo.bar", shell=True)
return result
@JafarShaik01
Copy link

Hi,

im getting error
/bin/sh: curl: command not found.

any suggestions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment