Skip to content

Instantly share code, notes, and snippets.

View felipedbene's full-sized avatar

Felipe De Bene felipedbene

  • AWS
  • Monterrey Mexico
View GitHub Profile
#!/bin/bash
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB.
SIZE=${1:-20}
# Get the ID of the environment host Amazon EC2 instance.
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
# Get the ID of the Amazon EBS volume associated with the instance.
VOLUMEID=$(aws ec2 describe-instances \