aws sqs send-message: Send to an SQS Queue in CI
Enqueue a message onto a standard or FIFO SQS queue.
aws sqs send-message places a message on an SQS queue identified by its URL. In CI it triggers async workers - kicking off a backfill, notifying a pipeline, or injecting a test message for an integration check.
Common flags
--queue-url- the full queue URL (required)--message-body- the message payload (required)--message-group-id- required for FIFO queues--message-deduplication-id- dedup key for FIFO without content dedup--delay-seconds- delay delivery (standard queues)
Example in CI
Trigger a background job after a deploy.
shell
aws sqs send-message --queue-url ${JOB_QUEUE_URL} --message-body '{"task":"backfill"}'Common errors in CI
- An error occurred (AWS.SimpleQueueService.NonExistentQueue) - wrong queue URL or region
- The request must contain the parameter MessageGroupId - FIFO queue needs --message-group-id
- An error occurred (AccessDenied) - role lacks sqs:SendMessage
Key takeaways
- You address the queue by its full URL, not just the name.
- FIFO queues require --message-group-id (and often a dedup id).
- NonExistentQueue almost always means a region mismatch with the URL.
Related guides
aws dynamodb put-item: Write to DynamoDB in CIaws dynamodb put-item writes or replaces an item in a DynamoDB table. Learn the item, condition-expression, a…
aws lambda invoke: Invoke a Lambda Function in CIaws lambda invoke runs a Lambda function and captures its response. Learn the payload, log-type, and cli-bina…
aws logs tail: Stream CloudWatch Logs in CIaws logs tail streams or fetches CloudWatch Logs for a log group. Learn the follow, since, and filter-pattern…