def set_attributes(name, attributes, region=None, key=None, keyid=None,
                   profile=None):
    ret = True
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    queue_obj = conn.get_queue(name)
    if not queue_obj:
        log.error('Queue {0} does not exist.'.format(name))
        ret = False
    if isinstance(attributes, string_types):
        attributes = json.loads(attributes)
    for attr, val in six.iteritems(attributes):
        attr_set = queue_obj.set_attribute(attr, val)
        if not attr_set:
            msg = 'Failed to set attribute {0} = {1} on queue {2}'
            log.error(msg.format(attr, val, name))
            ret = False
        else:
            msg = 'Set attribute {0} = {1} on queue {2}'
            log.info(msg.format(attr, val, name))
    return ret
Set attributes on an SQS queue.
dataset/ETHPy150Open saltstack/salt/salt/modules/boto_sqs.py/set_attributes