aws-automated-backup-powershell icon indicating copy to clipboard operation
aws-automated-backup-powershell copied to clipboard

Minor changes

Open buddypepper opened this issue 10 years ago • 1 comments

I made a few minor changes to this, but I've got no idea how to submit them...namely:

  • added the ability to set the "name" tag of the snapshots using $snapshot_name in AWSConfig
  • changed the $serviceURL and $sesURL to be calculated based on a new var $AWS_Region (this was because the call to add a tag required the region to be known..and since the region is in the urls, why not just deal with it the one time)

I'd be happy to share the code, but I'll need a little guidance.

buddypepper avatar Jul 07 '15 18:07 buddypepper

I'm just going to leave my suggested changes here, in case it's every of use to anyone....

AWSConfig.ps1: #General $snapshot_name="Automated Daily Backup" $AWS_Region="us-east-1"

#EC2 Regions $serviceURL="https://ec2." + $AWS_Region + ".amazonaws.com"

#SES Regions (do not uncomment if using custom email server) $sesURL="https://email." + $AWS_Region +".amazonaws.com"

AWSUtilities.ps1 (add this before the line "return $createSnapshotResult.Snapshot.SnapshotId" in "CreateSnapshotForInstance": new-ec2tag -AccessKey $accessKeyID -SecretKey $secretAccessKey -Region $AWS_Region -Resources $createSnapshotResult.Snapshot.SnapshotId -Tags @{ Key="Name"; Value = $snapshot_name }

buddypepper avatar Apr 21 '16 17:04 buddypepper