from __future__ import unicode_literals import boto3 from moto.core import BaseBackend, BaseModel class {{ service_class }}Backend(BaseBackend): def __init__(self, region_name=None): super({{ service_class }}Backend, self).__init__() self.region_name = region_name def reset(self): region_name = self.region_name self.__dict__ = {} self.__init__(region_name) # add methods from here available_regions = boto3.session.Session().get_available_regions("{{ service }}") {{ escaped_service }}_backends = {region: {{ service_class }}Backend(region) for region in available_regions}