This file contains hidden or 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
import pdb | |
pdb.set_trace() | |
# b: set a breakpoint | |
# c: continue debugging until you hit a breakpoint | |
# s: step through the code | |
# n: to go to next line of code | |
# l: list source code for the current file (default: 11 lines including the line being executed) | |
# u: navigate up a stack frame | |
# d: navigate down a stack frame |
This file contains hidden or 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
{ | |
"Records": [ | |
{ | |
"EventSource": "aws:sns", | |
"EventVersion": "1.0", | |
"EventSubscriptionArn": "arn:aws:sns:us-east-1:[account-id]:CostAnomalyQueue:f6df06cb-a1be-48be-b560-85876b7821b2", | |
"Sns": { | |
"Type": "Notification", | |
"MessageId": "31236cc0-d7be-55ec-a6f7-35aaf7b15d43", | |
"TopicArn": "arn:aws:sns:us-east-1:[account-id]:CostAnomalyQueue", |
This file contains hidden or 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
exports.handler = async () => { | |
// causes a crash every other minute by returning an invalid value | |
return (new Date().getMinutes() % 2) ? () => {} : 1; | |
}; |
This file contains hidden or 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
dump = (target, match_re, depth, seen) => { | |
if (depth === undefined) depth = 0 | |
if (seen === undefined) seen = [target] | |
Object.keys(target).forEach((i, idx) => { | |
value = target[i] ?? "null"; | |
isObject = (value === Object(value)); |