diff --git a/lib/aws/endpoint_provider.rb b/lib/aws/endpoint_provider.rb
index <HASH>..<HASH> 100644
--- a/lib/aws/endpoint_provider.rb
+++ b/lib/aws/endpoint_provider.rb
@@ -19,6 +19,7 @@ module Aws
       service_rules(options[:service].to_s).each do |rule|
         return rule.apply(options) if rule.matches?(options)
       end
+      nil
     end
 
     # Removes all rules.
The endpoint provider now returns nil when an endpoint can not be resolved.