-
Make sure the instance has
arn:aws:iam::aws:policy/AmazonEC2FullAccess
permissions. -
Create a script called
resize.sh
with the following contents:
#!/bin/bash
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB.
SIZE=${1:-20}