Created
November 1, 2016 19:13
-
-
Save thiagomgo/7f738b8d89a537ba1aa4d97d90b17c28 to your computer and use it in GitHub Desktop.
A simple lambda function written in python to execute a curl command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def lambda_handler(event, context): | |
import subprocess | |
result = subprocess.call("curl -I http://foo.bar", shell=True) | |
return result | |
it shows me a zero (0) when I get the result at the other side
Hi, I have the same issue, did you figure out whats happend?
Thanks in advance
Hi, I have the same issue. Did you figure out the workaround?
Thank you.
0 => success
"returncode: Exit status of the child process. Typically, an exit status of 0 indicates that it ran successfully."
=> https://docs.python.org/3/library/subprocess.html
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
it shows me a zero (0) when I get the result at the other side