Skip to content

Instantly share code, notes, and snippets.

View dotarr's full-sized avatar

dot arr dotarr

View GitHub Profile
@dotarr
dotarr / awsprofile.sh
Last active May 13, 2021 10:09
Interactive AWS profile selector
#!/bin/bash
CONFIG_FILE="${HOME}/.aws/config"
function awsprofile() {
if [ -z ${AWS_PROFILE+x} ]; then msg="AWS_PROFILE is unset"; else msg="Current AWS_PROFILE=${AWS_PROFILE}"; fi
echo -e "\n${msg}"
echo -e "Available profiles:\n"
PS3=$'\n'"Use number to select, 'u' to unset or 'q' to quit: "
@dotarr
dotarr / lambda_harness.py
Created July 29, 2018 14:19
Lambda Harness
"""
Basic script to set up environment variables and call a lambda entry point so
that it can be ran locally
"""
import logging
import os
import sys
import my_lambda as ml