Run Amazon SQS FIFO messages
The First-in, First-out (FIFO) queues are designed to ensure that the order in which messages are sent and received is strictly preserved and that each Amazon SQS message is processed exactly once.
The FIFO queue always keeps transactions within an Amazon SQS message group in the order in which they arrived.
To require Amazon SQS messages to be processed, choose one of the following connection types and follow the steps below.
![]() |
To determine whether a queue is FIFO, check whether Amazon SQS message ends with the fifo file extension. |
Methods: Push, Pull and Purge actions.
Option 1 - Run Amazon SQS FIFO messages with a predefined connection
Push messages
To push messages with a predefined Amazon SQS FIFO messages, follow the steps below:
-
In the Connection section, go to Manage to create an Amazon SQS connection.
-
From the Connection drop-down menu, select your connection.
-
In the Action drop-down menu, select Push. The Endpoint field displays the ARN.
-
In the Payload field, enter your message.
-
Click the
icon to the right side of the message section. Double-click the respective rows to edit the header value entries for:
-
MessageGroupID: Use this key to specify multiple ordered message groups within a single queue.
-
MessageDeduplicationID: Optionally, use this key to manage deduplication of sent messages.
For more information on MessageGroupID and MessageDeduplicationID, see the AWS documentation.
-
-
Click on
Run in the API Scan menu to send your message to the specified queue.
Push Amazon SQS FIFO message in API Scan
Pull messages
To pull messages with a predefined Amazon SQS FIFO message, follow the steps below:
-
In the Connection section, go to Manage in order to create an Amazon SQS connection.
-
From the Connection drop-down menu, select your connection.
-
In the Action drop-down menu, select Pull. The Endpoint field displays the ARN.
-
Click the
icon to the right side of the message section. Double-click the respective rows to edit the header value entries for:
-
MessageGroupID: Use this key to specify multiple ordered message groups within a single queue.
-
MessageDeduplicationID: Optionally, use this key to manage deduplication of sent messages.
For more information on MessageGroupID and MessageDeduplicationID, see the AWS documentation.
-
-
Click on
Run in the API Scan menu to receive your message in the specified queue. Only one message is retrieved at a time. To retrieve multiple messages, create a Loop. See also Amazon SQS Visibility Timeout.
Pull Amazon SQS FIFO message in API Scan
Purge a queue
To purge an Amazon SQS queue with a predefined connection, follow the steps below:
-
In the Connection section, go to Manage in order to create an Amazon SQS connection.
-
From the Connection drop-down menu, select your connection.
-
In the Action drop-down menu, select Purge. The Endpoint field displays the ARN.
-
Click on
Run in the API Scan menu to purge the specified queue. The queue is then cleared of all messages.
Purge Amazon SQS FIFO queue in API Scan
Option 2 - Run Amazon SQS FIFO messages with a non-predefined connection
Push messages
To push messages with a non-predefined Amazon SQS FIFO message, follow the steps below:
-
From the Connection drop-down menu, select <explicit>.
-
In the Endpoint field, copy the Amazon Resource Name (ARN) of your selected SQS FIFO queue from the AWS console in the Details tab.
-
In the Action drop-down menu, select Push.
-
In the Auth tab, choose AWS Signature from the Authentication drop-down list and enter Access Key and Secret Key credentials for your AWS account.
-
Optionally, enter your Session Token in case you have temporary credentials.
-
Optionally, in case your endpoint does not contain a Region entry, select it from the drop-down menu. The default value is US East (Ohio).
-
Click the
icon to the right side of the message section. Double-click the respective rows to edit the header value entries for:
-
MessageGroupID: Use this key to specify multiple ordered message groups within a single queue.
-
MessageDeduplicationID: Optionally, use this key to manage deduplication of sent messages.
For more information on MessageGroupID and MessageDeduplicationID, see the AWS documentation.
-
-
In the Payload field, enter your message.
-
Click on
Run in the API Scan menu to send your message on the queue to the specified queue.
Push action: Auth tab for Amazon SQS FIFO message in API Scan
Pull messages
To pull messages with a non-predefined Amazon SQS FIFO message, follow the steps below:
-
From the Connection drop-down menu, select <explicit>.
-
In the Endpoint field, copy the Amazon Resource Name (ARN) of your selected SQS FIFO queue from the AWS console in the Details tab.
-
In the Action drop-down menu, select Pull.
-
In the Auth tab, choose AWS Signature from the Authentication drop-down list and enter Access Key and Secret Key credentials for your AWS account.
-
Optionally, enter your Session Token in case you have temporary credentials.
-
Optionally, in case your endpoint does not contain a Region entry, select it from the drop-down menu. The default value is US East (Ohio).
-
Click the
icon to the right side of the message section. Double-click the respective rows to edit the header value entries for:
-
MessageGroupID: Use this key to specify multiple ordered message groups within a single queue.
-
MessageDeduplicationID: Optionally, use this key to manage deduplication of sent messages.
For more information on MessageGroupID and MessageDeduplicationID, see the AWS documentation.
-
-
Click on
Run in the API Scan menu to receive your message in the specified queue. Only one message is retrieved at the time. To retrieve multiple messages, create a Loop. Also see Amazon SQS Visibility Timeout.
After running your Amazon SQS FIFO messages in API Scan, you can export them to Tosca Commander. This allows you to use the message information to define Module Attributes and verify their values. Depending on what you want to test, you can export the messages as an API TestCase.
Purge a queue
To purge an Amazon SQS queue with a non-predefined Amazon SQS FIFO message, follow the steps below:
-
From the Connection drop-down menu, select <explicit>.
-
In the Endpoint field, copy the Amazon Resource Name (ARN) of your selected SQS FIFO queue from the AWS console in the Details tab.
-
In the Action drop-down menu, select Purge.
-
In the Auth tab, choose AWS Signature from the Authentication drop-down list and enter Access Key and Secret Key credentials for your AWS account.
-
Optionally, enter your Session Token in case you have temporary credentials.
-
Optionally, select a Region from the drop-down menu. The default value is US East (Ohio).
-
Click on
Run in the API Scan menu to purge the specified queue. The queue is then cleared of all messages.