amazon.aws.aws_sqs_queue event source – Receive events via an AWS SQS queue

Note

This EDA event source plugin is part of the amazon.aws collection (version 12.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install amazon.aws.

To use it in a playbook, specify: amazon.aws.aws_sqs_queue.

Synopsis

  • An ansible-rulebook event source plugin for receiving events via an AWS SQS queue.

  • This supports all the authentication methods supported by boto3 library: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html.

  • Each event is assigned a valid RFC 4122 UUID under meta.uuid.

  • The SQS MessageId is used directly if it is a valid UUID (AWS guarantees this).

  • If the MessageId is not a valid UUID, a deterministic UUID5 is generated from the MessageId value. The original value remains accessible under meta.MessageId.

Parameters

Parameter

Comments

access_key

string

Optional AWS access key ID.

delay_seconds

integer

The SQS long polling duration.

Set to 0 to disable.

Default: 2

eda_feedback_queue

string

added in amazon.aws 11.3.0

Provided automatically by ansible-rulebook when the feedback parameter is enabled, this parameter utilizes an asyncio.Queue. It allows the system to wait for confirmation that an event has been safely persisted in the database before removing it from the event queue. Users do not need to provide a value for this manually.

endpoint_url

string

Optional URL to connect to instead of the default AWS endpoints.

feedback

boolean

added in amazon.aws 11.3.0

Should the source plugin wait for feedback before processing the next event from SQS Queue. This flag allows ansible rulebook to pass in an asyncio queue which is passed in the eda_feedback_queue. The source plugin should wait for the response to come back on this queue before it picks the next event from SQS queue.

Choices:

  • false ← (default)

  • true

feedback_timeout

integer

added in amazon.aws 11.3.0

Timeout in seconds to wait for feedback from the rule engine before raising an exception. Only applies when feedback is enabled.

Default: 120

max_number_of_messages

integer

Optional The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values are 1 to 10.

Default: 1

name

string / required

Name of the queue.

queue_owner_aws_account_id

string

Optional The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.

region

string

Optional AWS region to use.

secret_key

string

Optional AWS secret access key.

session_token

string

Optional STS session token for use with temporary credentials.

Examples

- amazon.aws.aws_sqs_queue:
    region: us-east-1
    name: eda
    delay_seconds: 10