Skip to content

Instantly share code, notes, and snippets.

View rberrelleza's full-sized avatar
👋
Hi friend!

Ramiro Berrelleza rberrelleza

👋
Hi friend!
View GitHub Profile
@aaronzirbes
aaronzirbes / packer-kill-orphans.sh
Last active November 11, 2015 01:44
Delete orphaned artifacts left by packer.io
#!/bin/bash
set -e
# Keypairs
echo "Finding Key Pairs..."
KEY_PAIRS_JSON=`aws ec2 describe-key-pairs --filters 'Name=key-name,Values=packer*'`
KEY_PAIRS=`echo "${KEY_PAIRS_JSON}" | grep 'KeyName' |sed -e 's/.*"KeyName": "//' -e 's/",* *$//'`
# Security Groups