diff --git a/lib/fog/aws/requests/compute/describe_instances.rb b/lib/fog/aws/requests/compute/describe_instances.rb index bea4f68b3..4d3d288cb 100644 --- a/lib/fog/aws/requests/compute/describe_instances.rb +++ b/lib/fog/aws/requests/compute/describe_instances.rb @@ -58,9 +58,12 @@ module Fog filters = {'instance-id' => [*filters]} end params = {} - # when seeking single instance id, old param style provides more accurate data sooner - if filters['instance-id'] && !filters['instance-id'].is_a?(Array) - params.merge!('InstanceId' => filters.delete('instance-id')) + if filters['instance-id'] + instance_ids = filters.delete('instance-id') + instance_ids = [instance_ids] unless instance_ids.is_a?(Array) + instance_ids.each_with_index do |id, index| + params.merge!("InstanceId.#{index}" => id) + end end params.merge!(Fog::AWS.indexed_filters(filters))