from __future__ import unicode_literals from boto3 import Session 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 {{ escaped_service }}_backends = {} for region in Session().get_available_regions("{{ service }}"): {{ escaped_service }}_backends[region] = {{ service_class }}Backend() for region in Session().get_available_regions("{{ service }}", partition_name="aws-us-gov"): {{ escaped_service }}_backends[region] = {{ service_class }}Backend() for region in Session().get_available_regions("{{ service }}", partition_name="aws-cn"): {{ escaped_service }}_backends[region] = {{ service_class }}Backend()