'Do API calls to each region, and save data in cache files'

def do_api_calls_update_cache(self):

    if self.route53_enabled:
        self.get_route53_records()
    for region in self.regions:
        self.get_instances_by_region(region)
        self.get_rds_instances_by_region(region)
    if self.args.tags_only:
        self.write_to_cache(self.inventory, self.cache_path_tags)
    else:
        self.write_to_cache(self.inventory, self.cache_path_cache)
    self.write_to_cache(self.index, self.cache_path_index)
