{"action":"created","comment":{"url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/comments/36682526","id":36682526,"diff_hunk":"@@ -92,8 +93,9 @@ set -o pipefail\n ## Variable Declartions ##\n \n # Get Instance Details\n-instance_id=$(wget -q -O- http://169.254.169.254/latest/meta-data/instance-id)\n-region=$(wget -q -O- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/\\([1-9]\\).$/\\1/g')\n+#Uncomment this to determine region automatically\n+#region=$(wget -q -O- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/\\([1-9]\\).$/\\1/g')\n+region=us-west-2","path":"ebs-snapshot.sh","position":27,"original_position":27,"commit_id":"9a8107cf4c4e3f739b62069b449444f0a662304d","original_commit_id":"9a8107cf4c4e3f739b62069b449444f0a662304d","user":{"login":"klinquist","id":1343376,"avatar_url":"https://avatars.githubusercontent.com/u/1343376?v=3","gravatar_id":"","url":"https://api.github.com/users/klinquist","html_url":"https://github.com/klinquist","followers_url":"https://api.github.com/users/klinquist/followers","following_url":"https://api.github.com/users/klinquist/following{/other_user}","gists_url":"https://api.github.com/users/klinquist/gists{/gist_id}","starred_url":"https://api.github.com/users/klinquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinquist/subscriptions","organizations_url":"https://api.github.com/users/klinquist/orgs","repos_url":"https://api.github.com/users/klinquist/repos","events_url":"https://api.github.com/users/klinquist/events{/privacy}","received_events_url":"https://api.github.com/users/klinquist/received_events","type":"User","site_admin":false},"body":"In this case, I needed to hard code it so that I could run it from outside an AWS instance (from where http://169.254.169.254/latest/meta-data/placement/availability-zone is not available).   I don't think it's even necessary since the aws cli will read it from the same place(s) as your keys.","created_at":"2015-08-10T20:48:53Z","updated_at":"2015-08-10T20:48:53Z","html_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pull/12#discussion_r36682526","pull_request_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/comments/36682526"},"html":{"href":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pull/12#discussion_r36682526"},"pull_request":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12","id":41828734,"html_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pull/12","diff_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pull/12.diff","patch_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pull/12.patch","issue_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues/12","number":12,"state":"open","locked":false,"title":"Allows you to optionally backup all volumes from all your instances","user":{"login":"klinquist","id":1343376,"avatar_url":"https://avatars.githubusercontent.com/u/1343376?v=3","gravatar_id":"","url":"https://api.github.com/users/klinquist","html_url":"https://github.com/klinquist","followers_url":"https://api.github.com/users/klinquist/followers","following_url":"https://api.github.com/users/klinquist/following{/other_user}","gists_url":"https://api.github.com/users/klinquist/gists{/gist_id}","starred_url":"https://api.github.com/users/klinquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinquist/subscriptions","organizations_url":"https://api.github.com/users/klinquist/orgs","repos_url":"https://api.github.com/users/klinquist/repos","events_url":"https://api.github.com/users/klinquist/events{/privacy}","received_events_url":"https://api.github.com/users/klinquist/received_events","type":"User","site_admin":false},"body":"use:  ./ebs-snapshot.sh all","created_at":"2015-08-06T20:05:47Z","updated_at":"2015-08-10T20:48:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7287ecf78875d01fbf8a98b0fd2a2ce8cf2b4c2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12/commits","review_comments_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12/comments","review_comment_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues/12/comments","statuses_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/statuses/9a8107cf4c4e3f739b62069b449444f0a662304d","head":{"label":"klinquist:backup_all_volumes","ref":"backup_all_volumes","sha":"9a8107cf4c4e3f739b62069b449444f0a662304d","user":{"login":"klinquist","id":1343376,"avatar_url":"https://avatars.githubusercontent.com/u/1343376?v=3","gravatar_id":"","url":"https://api.github.com/users/klinquist","html_url":"https://github.com/klinquist","followers_url":"https://api.github.com/users/klinquist/followers","following_url":"https://api.github.com/users/klinquist/following{/other_user}","gists_url":"https://api.github.com/users/klinquist/gists{/gist_id}","starred_url":"https://api.github.com/users/klinquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinquist/subscriptions","organizations_url":"https://api.github.com/users/klinquist/orgs","repos_url":"https://api.github.com/users/klinquist/repos","events_url":"https://api.github.com/users/klinquist/events{/privacy}","received_events_url":"https://api.github.com/users/klinquist/received_events","type":"User","site_admin":false},"repo":{"id":40324369,"name":"aws-ec2-ebs-automatic-snapshot-bash","full_name":"klinquist/aws-ec2-ebs-automatic-snapshot-bash","owner":{"login":"klinquist","id":1343376,"avatar_url":"https://avatars.githubusercontent.com/u/1343376?v=3","gravatar_id":"","url":"https://api.github.com/users/klinquist","html_url":"https://github.com/klinquist","followers_url":"https://api.github.com/users/klinquist/followers","following_url":"https://api.github.com/users/klinquist/following{/other_user}","gists_url":"https://api.github.com/users/klinquist/gists{/gist_id}","starred_url":"https://api.github.com/users/klinquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinquist/subscriptions","organizations_url":"https://api.github.com/users/klinquist/orgs","repos_url":"https://api.github.com/users/klinquist/repos","events_url":"https://api.github.com/users/klinquist/events{/privacy}","received_events_url":"https://api.github.com/users/klinquist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/klinquist/aws-ec2-ebs-automatic-snapshot-bash","description":"Bash script for Automatic EBS Snapshots and Cleanup on Amazon Web Services (AWS).  Created by CaseyLabs.","fork":true,"url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash","forks_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/forks","keys_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/teams","hooks_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/hooks","issue_events_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/issues/events{/number}","events_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/events","assignees_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/assignees{/user}","branches_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/branches{/branch}","tags_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/tags","blobs_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/git/refs{/sha}","trees_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/statuses/{sha}","languages_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/languages","stargazers_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/stargazers","contributors_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/contributors","subscribers_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/subscribers","subscription_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/subscription","commits_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/commits{/sha}","git_commits_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/git/commits{/sha}","comments_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/comments{/number}","issue_comment_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/issues/comments{/number}","contents_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/contents/{+path}","compare_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/merges","archive_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/downloads","issues_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/issues{/number}","pulls_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/pulls{/number}","milestones_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/milestones{/number}","notifications_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/labels{/name}","releases_url":"https://api.github.com/repos/klinquist/aws-ec2-ebs-automatic-snapshot-bash/releases{/id}","created_at":"2015-08-06T20:02:34Z","updated_at":"2015-08-06T20:02:35Z","pushed_at":"2015-08-06T20:05:28Z","git_url":"git://github.com/klinquist/aws-ec2-ebs-automatic-snapshot-bash.git","ssh_url":"git@github.com:klinquist/aws-ec2-ebs-automatic-snapshot-bash.git","clone_url":"https://github.com/klinquist/aws-ec2-ebs-automatic-snapshot-bash.git","svn_url":"https://github.com/klinquist/aws-ec2-ebs-automatic-snapshot-bash","homepage":"http://www.caseylabs.com","size":274,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CaseyLabs:master","ref":"master","sha":"1f6168be293ca8d2600ba461522e7c6853c2215a","user":{"login":"CaseyLabs","id":4674433,"avatar_url":"https://avatars.githubusercontent.com/u/4674433?v=3","gravatar_id":"","url":"https://api.github.com/users/CaseyLabs","html_url":"https://github.com/CaseyLabs","followers_url":"https://api.github.com/users/CaseyLabs/followers","following_url":"https://api.github.com/users/CaseyLabs/following{/other_user}","gists_url":"https://api.github.com/users/CaseyLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CaseyLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaseyLabs/subscriptions","organizations_url":"https://api.github.com/users/CaseyLabs/orgs","repos_url":"https://api.github.com/users/CaseyLabs/repos","events_url":"https://api.github.com/users/CaseyLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CaseyLabs/received_events","type":"User","site_admin":false},"repo":{"id":19416020,"name":"aws-ec2-ebs-automatic-snapshot-bash","full_name":"CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash","owner":{"login":"CaseyLabs","id":4674433,"avatar_url":"https://avatars.githubusercontent.com/u/4674433?v=3","gravatar_id":"","url":"https://api.github.com/users/CaseyLabs","html_url":"https://github.com/CaseyLabs","followers_url":"https://api.github.com/users/CaseyLabs/followers","following_url":"https://api.github.com/users/CaseyLabs/following{/other_user}","gists_url":"https://api.github.com/users/CaseyLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CaseyLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaseyLabs/subscriptions","organizations_url":"https://api.github.com/users/CaseyLabs/orgs","repos_url":"https://api.github.com/users/CaseyLabs/repos","events_url":"https://api.github.com/users/CaseyLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CaseyLabs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash","description":"Bash script for Automatic EBS Snapshots and Cleanup on Amazon Web Services (AWS).  Created by CaseyLabs.","fork":false,"url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash","forks_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/forks","keys_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/teams","hooks_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/hooks","issue_events_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues/events{/number}","events_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/events","assignees_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/assignees{/user}","branches_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/branches{/branch}","tags_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/tags","blobs_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/git/refs{/sha}","trees_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/statuses/{sha}","languages_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/languages","stargazers_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/stargazers","contributors_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/contributors","subscribers_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/subscribers","subscription_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/subscription","commits_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/commits{/sha}","git_commits_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/git/commits{/sha}","comments_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/comments{/number}","issue_comment_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues/comments{/number}","contents_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/contents/{+path}","compare_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/merges","archive_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/downloads","issues_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues{/number}","pulls_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls{/number}","milestones_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/milestones{/number}","notifications_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/labels{/name}","releases_url":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/releases{/id}","created_at":"2014-05-04T01:19:23Z","updated_at":"2015-08-06T15:35:31Z","pushed_at":"2015-08-07T18:43:18Z","git_url":"git://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash.git","ssh_url":"git@github.com:CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash.git","clone_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash.git","svn_url":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash","homepage":"http://www.caseylabs.com","size":274,"stargazers_count":61,"watchers_count":61,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":2,"forks":47,"open_issues":2,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12"},"html":{"href":"https://github.com/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pull/12"},"issue":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues/12"},"comments":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash/statuses/9a8107cf4c4e3f739b62069b449444f0a662304d"}}}}