Aws::EC2::Errors::InvalidInstanceIDNotFound thrown for describe_instances
Closed this issue · 3 comments
Every now and then a call to describe_instances throws the following exception:
Aws::EC2::Errors::InvalidInstanceIDNotFound: The instance ID 'i-xxxxxxxx' does not exist
I am not passing in anything to the call for describe_instances (Just getting a complete listing for a region.) Seems odd that I would get this error returned back, even if for example while the aws api was processing the result set an instance was deleted...
I suspect this isn't related to the gem, so if that is true, I guess just close this.
File "/home/code/vendor/bundle/jruby/1.9/bundler/gems/aws-sdk-core-ruby-2c1e414b823b/aws-sdk-core/lib/seahorse/client/plugins/raise_response_errors.rb" line 15 in call
File "/home/code/vendor/bundle/jruby/1.9/bundler/gems/aws-sdk-core-ruby-2c1e414b823b/aws-sdk-core/lib/seahorse/client/plugins/param_conversion.rb" line 22 in call
File "/home/code/vendor/bundle/jruby/1.9/bundler/gems/aws-sdk-core-ruby-2c1e414b823b/aws-sdk-core/lib/aws-sdk-core/plugins/response_paging.rb" line 10 in call
File "/home/code/vendor/bundle/jruby/1.9/bundler/gems/aws-sdk-core-ruby-2c1e414b823b/aws-sdk-core/lib/seahorse/client/request.rb" line 70 in send_request
File "/home/code/vendor/bundle/jruby/1.9/bundler/gems/aws-sdk-core-ruby-2c1e414b823b/aws-sdk-core/lib/seahorse/client/base.rb" line 215 in describe_instances
Can you add some code to rescue this particular error and then log a few details. You should be able to do something like:
begin
# call to describe instances here
rescue Aws::EC2::Errors::InvalidInstanceIDNotFound => error
# feel free to send this output to a log file ...
puts error.context.http_request.body_contents
puts error.context.http_response.body_contents
puts error.context.params.inspect
end
Those three messages will contain the entire body of the DescribeInstances API call request and response bodies, as well as the request params given to #desribe_instances
. This will should be enough information to ensure the SDK did not send any instance IDs to the service & provide a request-id that we can forward onto EC2 for debugging on their end.
Thank you for reporting this issue.
Ping. Are you still encountering this issue?
Haven't seen it in a while. Closing.