{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/928","labels_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/928/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/928/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/928/events","html_url":"https://github.com/aws/aws-sdk-ruby/issues/928","id":107215847,"number":928,"title":"Destination region breaks auto pre-signed URL in snapshot_copy","user":{"login":"rambler","id":321428,"avatar_url":"https://avatars.githubusercontent.com/u/321428?v=3","gravatar_id":"","url":"https://api.github.com/users/rambler","html_url":"https://github.com/rambler","followers_url":"https://api.github.com/users/rambler/followers","following_url":"https://api.github.com/users/rambler/following{/other_user}","gists_url":"https://api.github.com/users/rambler/gists{/gist_id}","starred_url":"https://api.github.com/users/rambler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rambler/subscriptions","organizations_url":"https://api.github.com/users/rambler/orgs","repos_url":"https://api.github.com/users/rambler/repos","events_url":"https://api.github.com/users/rambler/events{/privacy}","received_events_url":"https://api.github.com/users/rambler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/labels/enhancement","name":"enhancement","color":"02d7e1"},{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/labels/Version%202","name":"Version 2","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-18T14:40:37Z","updated_at":"2015-10-14T19:23:51Z","closed_at":"2015-10-14T19:23:51Z","body":"When you copy a snapshot from one region to another using `#copy_snapshot`, the `EC2CopyEncryptedSnapshot` plugin is automatically applied (this is awesome when it works).\r\n\r\nHowever,\r\n\r\nA) It's not clear from the documentation for `#copy_snapshot` that this plugin will be invoked or how to use it (i.e. the client needs to be one for the destination region).\r\n\r\nB) The plugin doesn't work if the `destination_region` option is supplied. In the two code snippets below, the first one fails but the second one succeeds.\r\n\r\nFails:\r\n```ruby\r\n            copy_snap_id = @ec2_alt.copy_snapshot(\r\n                {\r\n                    source_region: @default_region,\r\n                    source_snapshot_id: snap_id,\r\n                    destination_region: @alt_region,\r\n                    description: \"Copy of #{@default_region} snapshot #{snap_id} of volume #{vol_id}\",\r\n                    encrypted: true,\r\n                }\r\n            ).snapshot_id\r\n```\r\n\r\nSucceeds:\r\n```ruby\r\n            copy_snap_id = @ec2_alt.copy_snapshot(\r\n                {\r\n                    source_region: @default_region,\r\n                    source_snapshot_id: snap_id,\r\n                    description: \"Copy of #{@default_region} snapshot #{snap_id} of volume #{vol_id}\",\r\n                    encrypted: true,\r\n                }\r\n            ).snapshot_id\r\n```"}}