{"action":"created","issue":{"url":"https://api.github.com/repos/fog/fog-aws/issues/23","labels_url":"https://api.github.com/repos/fog/fog-aws/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/fog/fog-aws/issues/23/comments","events_url":"https://api.github.com/repos/fog/fog-aws/issues/23/events","html_url":"https://github.com/fog/fog-aws/issues/23","id":54504052,"number":23,"title":"Setting region of AWS::Compute after initialization","user":{"login":"plribeiro3000","id":672952,"avatar_url":"https://avatars.githubusercontent.com/u/672952?v=3","gravatar_id":"","url":"https://api.github.com/users/plribeiro3000","html_url":"https://github.com/plribeiro3000","followers_url":"https://api.github.com/users/plribeiro3000/followers","following_url":"https://api.github.com/users/plribeiro3000/following{/other_user}","gists_url":"https://api.github.com/users/plribeiro3000/gists{/gist_id}","starred_url":"https://api.github.com/users/plribeiro3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plribeiro3000/subscriptions","organizations_url":"https://api.github.com/users/plribeiro3000/orgs","repos_url":"https://api.github.com/users/plribeiro3000/repos","events_url":"https://api.github.com/users/plribeiro3000/events{/privacy}","received_events_url":"https://api.github.com/users/plribeiro3000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T21:05:09Z","updated_at":"2016-01-11T16:28:26Z","closed_at":null,"body":"Original issue at: fog/fog#1825\r\n\r\nIt would be nice to be able to change the aws region AFTER the connection object is created, however this does not seem to be possible.  The host and excon connection still point to ec2.us-east-1.amazonaws.com even though the region has been set to 'us-west-1'. \r\n\r\n1.9.2p290 :024 > ec2_connection = Fog::Compute::AWS.new(:aws_access_key_id => 'AKIAI....', :aws_secret_access_key => 'wrun.............')\r\n => #<Fog::Compute::AWS::Real:70116107567500 @use_iam_profile=nil @aws_access_key_id=\"AKIAIK..........\" @aws_credentials_expire_at=nil @connection_options={} @region=\"us-east-1\" @instrumentor=nil @instrumentor_name=\"fog.aws.compute\" @version=\"2012-12-01\" @endpoint=nil @host=\"ec2.us-east-1.amazonaws.com\" @path=\"/\" @persistent=false @port=443 @scheme=\"https\" @connection=#<Fog::Connection:0x007f8a5b5d17f8 @excon=#<Excon::Connection:7f8a5b5d12d0 @data={:chunk_size=>1048576, :connect_timeout=>60, :headers=>{\"User-Agent\"=>\"fog/1.9.0\"}, :idempotent=>false, :instrumentor_name=>\"excon\", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>\"/Users/atistler/.rvm/gems/ruby-1.9.2-p290@cloudstack/gems/excon-0.21.0/data/cacert.pem\", :ssl_verify_peer=>false, :uri_parser=>URI, :write_timeout=>60, :host=>\"ec2.us-east-1.amazonaws.com\", :path=>\"/\", :port=>\"443\", :query=>nil, :scheme=>\"https\", :user=>nil, :password=>nil} @socket_key=\"https://ec2.us-east-1.amazonaws.com:443\">, @persistent=false>>\r\n1.9.2p290 :025 > ec2_connection.region = 'us-west-1'\r\n => \"us-west-1\"\r\n1.9.2p290 :026 > ec2_connection\r\n => #<Fog::Compute::AWS::Real:70116107567500 @use_iam_profile=nil @aws_access_key_id=\"AKIAIKTPL6FEOAZCNTYQ\" @aws_credentials_expire_at=nil @connection_options={} @region=\"us-west-1\" @instrumentor=nil @instrumentor_name=\"fog.aws.compute\" @version=\"2012-12-01\" @endpoint=nil @host=\"ec2.us-east-1.amazonaws.com\" @path=\"/\" @persistent=false @port=443 @scheme=\"https\" @connection=#<Fog::Connection:0x007f8a5b5d17f8 @excon=#<Excon::Connection:7f8a5b5d12d0 @data={:chunk_size=>1048576, :connect_timeout=>60, :headers=>{\"User-Agent\"=>\"fog/1.9.0\"}, :idempotent=>false, :instrumentor_name=>\"excon\", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>\"/Users/atistler/.rvm/gems/ruby-1.9.2-p290@cloudstack/gems/excon-0.21.0/data/cacert.pem\", :ssl_verify_peer=>false, :uri_parser=>URI, :write_timeout=>60, :host=>\"ec2.us-east-1.amazonaws.com\", :path=>\"/\", :port=>\"443\", :query=>nil, :scheme=>\"https\", :user=>nil, :password=>nil} @socket_key=\"https://ec2.us-east-1.amazonaws.com:443\">, @persistent=false>>"},"comment":{"url":"https://api.github.com/repos/fog/fog-aws/issues/comments/170605324","html_url":"https://github.com/fog/fog-aws/issues/23#issuecomment-170605324","issue_url":"https://api.github.com/repos/fog/fog-aws/issues/23","id":170605324,"user":{"login":"fwininger","id":4974759,"avatar_url":"https://avatars.githubusercontent.com/u/4974759?v=3","gravatar_id":"","url":"https://api.github.com/users/fwininger","html_url":"https://github.com/fwininger","followers_url":"https://api.github.com/users/fwininger/followers","following_url":"https://api.github.com/users/fwininger/following{/other_user}","gists_url":"https://api.github.com/users/fwininger/gists{/gist_id}","starred_url":"https://api.github.com/users/fwininger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwininger/subscriptions","organizations_url":"https://api.github.com/users/fwininger/orgs","repos_url":"https://api.github.com/users/fwininger/repos","events_url":"https://api.github.com/users/fwininger/events{/privacy}","received_events_url":"https://api.github.com/users/fwininger/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T16:28:26Z","updated_at":"2016-01-11T16:28:26Z","body":":+1: "}}