aws logs tail

0.0% Savings
0 Commands
0 Tokens saved
2 Tests

Install

tokf install d888732264fa748747cf7e21cda4042d4784b6fc68dffe2511a94728778b5460
Safety checks passed

Filter definition

command = "aws logs tail"

strip_ansi = true
collapse_empty_lines = true

skip = [
    "^\\S+\\s+START RequestId:",
    "^\\S+\\s+END RequestId:",
    "^\\S+\\s+REPORT RequestId:",
    "^\\S+\\s+EXTENSION",
    "^\\S+\\s+\\[DEBUG\\]",
    "^\\S+\\s+DEBUG:",
    "INIT_START Runtime Version",
]

[on_failure]
tail = 40

Examples

failure shows error logs ~91 tokens → ~44 tokens (52% saved)
Raw output
2024-01-15T10:30:45.000Z START RequestId: abc-123 Version: $LATEST
2024-01-15T10:30:45.200Z 2024/01/15 10:30:45 ERROR: failed to get user: DynamoDB timeout
2024-01-15T10:30:45.300Z 2024/01/15 10:30:45 panic: runtime error: nil pointer dereference
2024-01-15T10:30:45.600Z END RequestId: abc-123
2024-01-15T10:30:45.700Z REPORT RequestId: abc-123 Duration: 500.00 ms
Filtered output
2024-01-15T10:30:45.200Z 2024/01/15 10:30:45 ERROR: failed to get user: DynamoDB timeout
2024-01-15T10:30:45.300Z 2024/01/15 10:30:45 panic: runtime error: nil pointer dereference
success filters Lambda lifecycle noise and keeps app logs ~160 tokens → ~41 tokens (74% saved)
Raw output
2024-01-15T10:30:45.000Z START RequestId: abc-123 Version: $LATEST
2024-01-15T10:30:45.100Z INIT_START Runtime Version: provided:al2023.v18
2024-01-15T10:30:45.200Z [DEBUG] loading config
2024-01-15T10:30:45.300Z DEBUG: initializing handler
2024-01-15T10:30:45.400Z 2024/01/15 10:30:45 INFO: Processing request for user 12345
2024-01-15T10:30:45.500Z 2024/01/15 10:30:45 INFO: Request completed successfully
2024-01-15T10:30:45.600Z END RequestId: abc-123
2024-01-15T10:30:45.700Z REPORT RequestId: abc-123 Duration: 234.56 ms Billed Duration: 300 ms Memory Size: 128 MB Max Memory Used: 64 MB
2024-01-15T10:30:45.800Z EXTENSION logs collected
Filtered output
2024-01-15T10:30:45.400Z 2024/01/15 10:30:45 INFO: Processing request for user 12345
2024-01-15T10:30:45.500Z 2024/01/15 10:30:45 INFO: Request completed successfully
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters