Skip to content

Instantly share code, notes, and snippets.

View bcgalvin's full-sized avatar

Bryan Galvin bcgalvin

View GitHub Profile
@bcgalvin
bcgalvin / get-vars.py
Created November 30, 2020 08:51 — forked from singledigit/get-vars.py
Get all env variables for all AWS Lamda functions in a CloudFormation/SAM stack
#! /usr/bin/env python
# Use at your own risk and reward.
# requires boto3 to be installed
# example `./get-vars.py MyStack > vars.json`
import sys, json
import boto3
if len(sys.argv) == 1:
-----------------------------------------------
-- Get columns sorted by data type
select column_name, data_type
from raw.information_schema.columns
where table_schema = 'your_schema'
and table_name = 'your_table'
order by 2, 1;
-----------------------------------------------
-- Compare column availabilities and names