Skip to content

Instantly share code, notes, and snippets.


Hassy Veldstra hassy

Block or report user

Report or block hassy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hassy on github.
  • I am veldstra ( on keybase.
  • I have a public key ASA-ENS93q9-z-YpSNbYjE3jizrUDuaYY4rGqovAfdBPsQo

To claim this, I am signing this object:

# Local variables:
# mode: shell-script
# eval: (sh-set-shell "zsh")
# End:
alias k-system='kubectl -n kube-system'
source <(kubectl completion zsh)
function k-context() {
hassy / kms-vault
Last active Aug 23, 2019
Encrypt/decrypt files using AWS KMS
View kms-vault
#!/usr/bin/env bash
# License: MIT -
# Usage:
# Encrypt a file:
# kms-vault encrypt My-Key-Alias some-file-i-want-encrypted.txt > topsecret.asc
hassy / hang.js
Last active Dec 8, 2016
Trigger an infinite loop in Node.js 6.8.1+
View hang.js
var i1 = setImmediate(function() {
console.log('i1 cb');
var i2 = setImmediate(function() {
console.log('i2 cb');
hassy / processor.js
Created Nov 17, 2016
Custom Artillery functions to print the latency distribution for a single HTTP request
View processor.js
// Custom Artillery functions to print the latency distribution for a single HTTP request
// Example usage: (in your scenario)
// - get:
// url: "/some/endpoint"
// beforeRequest: ["recordStartTime"]
// afterResponse: ["logLatencyDelta"]
// name: "Optional name for the endpoint for the report"
hassy / searchItems.csv
Created Sep 27, 2016
Artillery CSV payloads
View searchItems.csv
item peanuts
item starburst
item eggs
item butter
item creamer
item pudding
item yogurt
item egg%20noodles
item alfredo

Tracing your own app

Set up lltrace-aws-sdk

Wait for enough activity to be traced

(a quick load-test is good if you're impatient)

Run lltrace


What can be traced

  • S3 putObject and uploadFile
  • Invoking other lambdas
  • Publishing to SNS topics
  • Custom actions (e.g. write to Neo4J)


By default only 10% of traced actions actually get logged.


How it works

SNS and S3 notifications are easy

Lambda activity - not quite so

Solution: monkey-patch aws-sdk 🙈


What we wanted

To recap:

  • 20 lambdas
  • 10 SNS topics (more than one subscriber/publisher for some)
  • S3 buckets (triggering lambdas)

You can’t perform that action at this time.