Provisioning the queue
Creating an AWS Simple Queue Service (SQS) queue is a straightforward process that can be accomplished using the AWS Management Console or AWS Command Line Interface (CLI). Here’s a step-by-step guide for creating an AWS SQS queue through the AWS Management Console:Note:
The visibility timeout has a significant impact on the behavior of asynchronous services.It determines how long a message remains hidden from consumers after it’s fetched from the queue, playing a vital role in preventing multiple consumers from processing the same message concurrently.For example, if your worker process typically takes around 5 seconds to complete a task, it’s advisable to set the Visibility Timeout to at least twice that duration, which in this case would be 10 seconds.If the Visibility Timeout is set too low, there’s a risk of multiple consumers attempting to process the same message simultaneously, potentially leading to conflicts and errors in your system. It’s essential to strike the right balance to ensure efficient and orderly message processing.
Configuring TrueFoundry Async Service with AWS SQS
You will have to specify these configurations for AWS SQS Input Worker:Configuring Autoscaling for AWS SQS Queue

Note:
This metric is only available in case you are using AWS SQS for your input queueParameters for SQS Average Backlog
- Queue lag threshold: This is the maximum number of messages each replica should handle. If there are more messages than the threshold, the auto-scaler adds replicas to share the workload.
Configuring AWS SQS Average Backlog
Through the User Interface (UI)
Via the Python SDK
In your Service deployment codedeploy.py
, include the following: