aws lambda invoke

0.0% Savings
0 Commands
0 Tokens saved
2 Tests

Install

tokf install d766a818d44a7f2d4df7a47e37bec7d26662aa8b25fc82753fa5379d79faee22
Safety checks passed

Filter definition

command = "aws lambda invoke"

strip_ansi = true
strip_empty_lines = true

skip = [
    "^\\s+\"LogResult\":",
    "^\\s+\"Payload\":",
]

keep = [
    "\"StatusCode\":",
    "\"FunctionError\":",
    "(?i)error",
]

[on_success]
output = "{output}"

[on_failure]
tail = 20

Examples

failure shows function error ~48 tokens → ~39 tokens (19% saved)
Raw output
{
    "StatusCode": 200,
    "FunctionError": "Unhandled",
    "ExecutedVersion": "$LATEST"
}

An error occurred (ResourceNotFoundException) when calling the Invoke operation: Function not found
Filtered output
    "StatusCode": 200,
    "FunctionError": "Unhandled",
An error occurred (ResourceNotFoundException) when calling the Invoke operation: Function not found
success shows status code ~14 tokens → ~5 tokens (64% saved)
Raw output
{
    "StatusCode": 200,
    "ExecutedVersion": "$LATEST"
}
Filtered output
    "StatusCode": 200,
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters