SQS

Create and manage SQS Queues

Overview

Cumulus makes configuring SQS queues simpler. Read the following sections to learn about configuring your queues with Cumulus. Example configuration can be found in the Cumulus repo.

Queues

Each queue is defined in its own file where the file name is the name of the queue. These files are located in a configurable folder. Queues are JSON objects with the following attributes:

Here is an example of a queue configuration:

{
  "delay": 0,
  "max-message-size": 262144,
  "message-retention": 345600,
  "receive-wait-time": 0,
  "visibility-timeout": 30,
  "dead-letter": {
    "target": "example-queue-2",
    "max-receives": 3
  },
  "policy": "example-policy"
}

Policies

The SQS API allows you to specify a policy when configuring a queue. These policies are in the same format as IAM policies and are stored in a configurable policies directory

Here is an example of a policy which allows another AWS account to send a message to example-queue

{
  "Version": "2008-10-17",
  "Id": "example-ID",
  "Statement": [
    {
      "Sid": "example-statement-ID",
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      },
      "Action": "SQS:SendMessage",
      "Resource": "arn:aws:sqs:us-east-1:OTHER_ACCOUNT_ID:example-queue"
    }
  ]
}

For more information see the IAM module

Diffing and Syncing Queues

Cumulus’s SQS module has the following usage:

cumulus sqs [diff|help|list|migrate|sync|urls] <asset>

Queues can be diffed, listed, synced, and migrated. The four actions do the following:

Configuration

Cumulus reads configuration from a configuration file, conf/configuration.json (the location of this file can also be specified by running cumulus with the --config option). The values in configuration.json can be changed to customized to change some of Cumulus’s behavior. The following is a list of the values in configuration.json that pertain to the SQS module: