Merge pull request #1576 from mikegrima/snsregions

SNS support for all boto3 regions.
This commit is contained in:
Steve Pulec 2018-04-18 21:15:39 -04:00 committed by GitHub
commit a90b7d4aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,11 +4,12 @@ import datetime
import uuid
import json
import boto.sns
import requests
import six
import re
from boto3 import Session
from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel
from moto.core.utils import iso_8601_datetime_with_milliseconds
@ -410,8 +411,8 @@ class SNSBackend(BaseBackend):
sns_backends = {}
for region in boto.sns.regions():
sns_backends[region.name] = SNSBackend(region.name)
for region in Session().get_available_regions('sns'):
sns_backends[region] = SNSBackend(region)
DEFAULT_TOPIC_POLICY = {