Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes #12

Open
buddypepper opened this issue Jul 7, 2015 · 1 comment
Open

Minor changes #12

buddypepper opened this issue Jul 7, 2015 · 1 comment

Comments

@buddypepper
Copy link

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
Copy link
Author

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 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant