Tools & utilities for AWS, written in Ruby.
Script will back up all volumes in the active region (eg: usingAWS_REGION
environment variable)
Assumes presence of valid credentials, whether using a shared credentials file, ec2 instance role (preferred), or environment variables.
Snapshots will be named as YY.MM.DD.TAG
- TAG is volume tag Name
- if tag not specified on volume, then TAG uses the Name tag of instance to which volume is attached.
- If both are blank, TAG will say UNTAGGED.
Adjust the "t" variable if you want the uploader to be valid for more than 24 hours.
Note: you must specify your own access key/secret key. The IAM user you create should ONLY have access to write to the target S3 bucket/folder. Policy attached to user will look something like this:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "S3Uploader", "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": [ "arn:aws:s3:::YOURBUCKET/YOURFOLDER/*" ] } ] }Enable a bucket for MFA delete.
To use:
- Uses virtual MFA device enabled on the root account.
- Replace VARIABLES with valid strings.
- Script will prompt for bucket name and current token value.
- Must run using root access keys; doesn't work as an IAM user.
PSA: Don't forget to disable root access keys when you're done with 'em.