Skip to content

Instantly share code, notes, and snippets.

@noahgift
Last active November 26, 2022 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahgift/c1a8315276cca0c9dd8b0e5d2f9bea7d to your computer and use it in GitHub Desktop.
Save noahgift/c1a8315276cca0c9dd8b0e5d2f9bea7d to your computer and use it in GitHub Desktop.
AWS Lambda + Invocation
def lambda_handler(event, context):
    if event["name"] == "Marco":
        return {"name":"Polo"}
    return {"name":"No"}
aws lambda invoke \
    --cli-binary-format raw-in-base64-out \
    --function-name MarcoPoloCLI \
    --payload '{ "name": "Bob" }' \
    response.json 
{
  "name": "Bob"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment