SQS
Quick Reference
# List queues
aws sqs list-queues --queue-name-prefix staging
# Get queue attributes (message count, in-flight, DLQ)
aws sqs get-queue-attributes --queue-url https://sqs.us-east-1.amazonaws.com/468036072962/staging-EcomMetricsQueue \
--attribute-names All
# Check approximate message count
aws sqs get-queue-attributes --queue-url {queue-url} \
--attribute-names ApproximateNumberOfMessages,ApproximateNumberOfMessagesNotVisible
# Receive a message (peek, without deleting)
aws sqs receive-message --queue-url {queue-url} --max-number-of-messages 1 --visibility-timeout 0
# Get DLQ message count
aws sqs get-queue-attributes --queue-url https://sqs.us-east-1.amazonaws.com/468036072962/staging-EcomMetricsQueueDLQ \
--attribute-names ApproximateNumberOfMessages
Key Queues
| Queue | Purpose | Consumer | DLQ |
|---|---|---|---|
{env}-EcomMetricsQueue | Search metrics from Cloudflare workers | EcomMetricsWorker Lambda | {env}-EcomMetricsQueueDLQ |
| Per-shop queues (dynamic) | Product indexing jobs per Shopify shop | EcomIndexerFunction Lambda | N/A |
Metrics Queue URLs by Environment
| Env | URL |
|---|---|
| Staging | https://sqs.us-east-1.amazonaws.com/468036072962/staging-EcomMetricsQueue |
| Preprod | https://sqs.us-east-1.amazonaws.com/010928202142/preprod-EcomMetricsQueue |
| Prod | https://sqs.us-east-1.amazonaws.com/023568249301/prod-EcomMetricsQueue |
What to Look For
| Symptom | Check |
|---|---|
| Metrics not processing | Check ApproximateNumberOfMessages on metrics queue (backlog) |
| DLQ messages | Check DLQ message count, receive a message to inspect error |
| Indexing stuck | Check per-shop queue depth (queues created dynamically by admin function) |
| Lambda not consuming | Check event source mapping: aws lambda list-event-source-mappings --function-name {fn} |