Any bucket created through cloudformation will have `"LocationConstraint": null`, implying us-east-1, although in AWS CloudFormation the bucket's region will always match the template's region.
import shutil
import requests
import dns.resolver
from io import BytesIO
from contextlib import closing
from datetime import datetime
from six import with_metaclass
from six.moves import cStringIO as StringIO
from six.moves.urllib.parse import urlparse
from multiprocessing.dummy import Pool
from localstack import config
from localstack.config import DEFAULT_ENCODING
from localstack.constants import ENV_DEV
from localstack.utils import bootstrap
from localstack.utils.bootstrap import FuncThread
TMP_FILES = []
TMP_THREADS = []
TMP_PROCESSES = []
CACHE_CLEAN_TIMEOUT = 60 * 5
CACHE_MAX_AGE = 60 * 60
CACHE_FILE_PATTERN = os.path.join(tempfile.gettempdir(), '_random_dir_', 'cache.*.json')
last_cache_clean_time = {'time': 0}
mutex_clean = threading.Semaphore(1)
TIMESTAMP_FORMAT = '%Y-%m-%dT%H:%M:%S'
TIMESTAMP_FORMAT_MILLIS = '%Y-%m-%dT%H:%M:%S.%fZ'
CODEC_HANDLER_UNDERSCORE = 'underscore'
DOWNLOAD_CHUNK_SIZE = 1024 * 1024
LOG = logging.getLogger(__name__)
INFRA_STOPPED = False
class CustomEncoder(json.JSONEncoder):