Skip to content

Instantly share code, notes, and snippets.

View jsamuel1's full-sized avatar

Josh Samuel jsamuel1

View GitHub Profile
@jsamuel1
jsamuel1 / aws-s3-buckets-with-tags.sh
Last active February 25, 2019 04:36 — forked from filipenf/aws-s3-buckets-with-tags.sh
Print a list of aws buckets along with their tags
#!/bin/bash
# lists all buckets along with their tags in the following format:
# bucket_name | { tag_name: tag_value }
for bucket in `aws s3api list-buckets | jq .Buckets[].Name -r`; do
tags=$(aws s3api get-bucket-tagging --bucket $bucket 2>/dev/null | jq -c '.[][] | {(.Key): .Value}' | tr '\n' '\t')
echo $bucket '|' $tags
done
@jsamuel1
jsamuel1 / instance-types.sh
Created September 25, 2018 04:52 — forked from trestletech/instance-types.sh
Get all EC2 Instance Types in All Availability Zones
#!/bin/bash
echo "Getting list of Availability Zones"
all_regions=$(aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]' | sort)
all_az=()
while read -r region; do
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort)
while read -r az; do

Keybase proof

I hereby claim:

  • I am jsamuel1 on github.
  • I am jsamuel (https://keybase.io/jsamuel) on keybase.
  • I have a public key ASA9hW6CyKMB7rNeWruvLZMTGpr5SduIWm6IgxTFIQEbiwo

To claim this, I am signing this object: