Created
July 17, 2019 14:48
-
-
Save paulstakem/1d10a8fed0e7d9b7c8ef2f8ae009e44e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export AWS_REGION=eu-west-2 | |
# VPCs | |
echo "### VPCs" | |
aws ec2 describe-vpcs --region $AWS_REGION | jq -r '.Vpcs[] | "\(.VpcId) - \(.CidrBlock) - \(.IsDefault)"' | sort | |
echo "" | |
# Subnets | |
echo "### Subnets" | |
aws ec2 describe-subnets --region $AWS_REGION | jq -r '.Subnets[] | "\(.SubnetId) - \(.CidrBlock) - \(.AvailabilityZone)"' | sort | |
echo "" | |
# ELB/ALB/NLB | |
echo "### ELB/ALB/NLB" | |
aws elb describe-load-balancers --region $AWS_REGION | jq -r '.LoadBalancerDescriptions[] | "\(.LoadBalancerName) - \(.DNSName)"' | |
aws elbv2 describe-load-balancers --region $AWS_REGION | jq -r '.LoadBalancers[] | "\(.LoadBalancerName) - \(.DNSName)"' | |
echo "" | |
# S3 Buckets | |
echo "### S3" | |
aws s3 ls | awk '{print $(NF)}' | |
echo "" | |
# EC2 Instances | |
echo "### EC2" | |
aws ec2 describe-instances --region $AWS_REGION | jq -r '.Reservations[] |.Instances[] | "\(.InstanceId) - \(.InstanceType) - \(.ImageId) - \(.PrivateIpAddress)"' | |
echo "" | |
# RDS | |
echo "### RDS" | |
aws rds describe-db-clusters --region $AWS_REGION | jq -r '.DBClusters[] | "\(.DatabaseName) - \(.Engine) - \(.EngineVersion)"' | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment