def set_attributes(
    name,
    attributes,
    region=None,
    key=None,
    keyid=None,
    profile=None,
):
    '''
    Set attributes on an SQS queue.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_sqs.set_attributes myqueue '{ReceiveMessageWaitTimeSeconds: 20}' region=us-east-1
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    attributes = _preprocess_attributes(attributes)

    try:
        url = conn.get_queue_url(QueueName=name)['QueueUrl']
        conn.set_queue_attributes(QueueUrl=url, Attributes=attributes)
    except botocore.exceptions.ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
    return {'result': True}
Set attributes on an SQS queue.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_sqs.set_attributes myqueue '{ReceiveMessageWaitTimeSeconds: 20}' region=us-east-1