O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Simple Queue Service

Message queuing is considered to be one of the integral parts of application management in the modern world. AWS provides a feature for this task called Simple Queue Service (SQS). In this recipe, we will learn how to configure SQS using Salt modules.

How to do it...

  1. Create and edit /opt/ salt-cookbook/production/aws/sqs.sls to have the following entries:
    saltcookbookqueue:
        boto_sqs.present:
            - region: us-west-2
            - keyid: <access-key>
            - key: '<secret-key>'
            - attributes:
                ReceiveMessageWaitTimeSeconds: 20
  2. Apply the state to the Salt master by using the following command:
    [root@salt-master aws]# salt 'salt-master' state.sls aws.sqs saltenv=production
    salt-master:
    ----------
              ID: saltcookbookqueue
     Function: boto_sqs.present ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required