Amazon Simple Queue Service (SQS) is a managed message queue on AWS. It supports microservices, distributed systems, and serverless applications.
Tenzir can interact with SQS by sending messages to and reading messages from SQS queues.
When reading from SQS queues, Tenzir receives one SQS message at a time and
emits the message body in the message field, together with SQS metadata such
as the message ID and receive count.
The poll_time parameter configures long polling.
This reduces empty responses when there are no messages available.
Tenzir pipelines that read from an SQS queue automatically send a deletion request after receiving messages.
Configuration
Section titled “Configuration”Follow the standard configuration instructions to authenticate with your AWS credentials.
Alternatively, use the aws_iam parameter to provide explicit credentials:
from_sqs "my-queue", aws_iam={ region: "us-east-1", access_key_id: secret("aws-key"), secret_access_key: secret("aws-secret")}See the from_sqs and to_sqs operator documentation for all available
options, including IAM role assumption.
Examples
Section titled “Examples”Send a message to an SQS queue
Section titled “Send a message to an SQS queue”from {foo: 42}to_sqs "sqs://my-queue"Receive messages from an SQS queue
Section titled “Receive messages from an SQS queue”from_sqs "sqs://my-queue", poll_time=5sthis = message.parse_json(){foo: 42}