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.
def fix_ids(obj, **kwargs):
        if isinstance(obj, dict):
            obj = dict(obj)
            for key, value in obj.items():
                if isinstance(value, BaseModel):
                    entity_id = get_entity_id(value)
                    obj[key] = entity_id or value
        return obj
    return recurse_object(resource_json, fix_ids)
def apply_patches():
    """ Apply patches to make LocalStack seamlessly interact with the moto backend.
        TODO: Eventually, these patches should be contributed to the upstream repo! """
    
    def get_key(self, bucket_name, key_name, version_id=None):