Skip to content

Instantly share code, notes, and snippets.

@tecmaverick
Last active May 15, 2020 03:37
Show Gist options
  • Save tecmaverick/05a6ea5bcfd2d8c75aa22ff5c455ca14 to your computer and use it in GitHub Desktop.
Save tecmaverick/05a6ea5bcfd2d8c75aa22ff5c455ca14 to your computer and use it in GitHub Desktop.
Lambda CLI Commands
#**********************************************************
#Upload binary file via AWS CLI v2
data=$(base64 < replace_with_filename.png)
aws lambda invoke \
--function-name replace_with_function_name \
--payload "{\"test\" : \"$data\"}" \
--cli-binary-format raw-in-base64-out \
output.txt
#---------------------------------------------------------
#**********************************************************
# List lambda functions by name and execution role
aws lambda list-functions --query "Functions[*].[FunctionName,Role]" --output table
#---------------------------------------------------------
#**********************************************************
# List all lambda functions in a region, if its more than 50
aws lambda list-functions --max-items 1000
#---------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment