Config
queue_names when one streaming source block should consume from multiple SQS queues.
Mage polls every configured queue and sends received messages through the same downstream
streaming pipeline. Existing single-queue configs can continue to use queue_name:
skip_failed_queues is enabled, Mage logs the failed queue name and continues polling the
remaining queues. If every configured queue fails to initialize, startup still fails.
Authentication
Here are the options to authenticate with AWS SQS.- Grant your Mage runtime an AWS IAM role with access to the configured queues. This is the recommended option for Mage deployments running on AWS infrastructure.
- Add the following keys and values to your runtime environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_SESSION_TOKENif you’re using temporary AWS credentialsAWS_DEFAULT_REGION
- Configure credentials in the source config. Use environment-variable references instead of
pasting raw secrets into the block YAML:
- If you deploy Mage on an AWS ECS cluster, you can use the ECS task execution role to authenticate. Grant the ECS task permissions to access SQS by attaching IAM policies to this role.
botocore.exceptions.NoRegionError error, try setting the AWS_DEFAULT_REGION
environment variable.
Pass raw message to transformer
Message deletion method
We support two ways to delete messages:- Delete the message in the data loader automatically after deserializing the message body.
- Set
message_deletion_method: AFTER_RECEIVEDin the source config. - The input of the transformer is the list of deserialized message body.
- Set
- Manually delete the message in transformer after processing the message.
-
Set
message_deletion_method: MANUALin the source config. -
The input of the transformer is the list of dictionary with the structure
You can use the following example code to process the message and delete it after.
-
Set