diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index da28234787b..fd53b71ecd3 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -523,7 +523,7 @@ class Ec2Inventory(object): # that's why we need to call describe directly (it would be called by # the shorthand method anyway...) try: - conn = elasticache.connect_to_region(region) + conn = self.connect_to_aws(elasticache, region) if conn: # show_cache_node_info = True # because we also want nodes' information @@ -559,7 +559,7 @@ class Ec2Inventory(object): # that's why we need to call describe directly (it would be called by # the shorthand method anyway...) try: - conn = elasticache.connect_to_region(region) + conn = self.connect_to_aws(elasticache, region) if conn: response = conn.describe_replication_groups()