Skip to content
v2.274.0

SqsSendMessageProps Struct ​

Properties for a SQS Queue Target.

Example ​

ts
const payload = 'test';
const messageGroupId = 'id';
const queue = new sqs.Queue(this, 'MyQueue', {
  fifo: true,
  contentBasedDeduplication: true,
});

const target = new targets.SqsSendMessage(queue, {
    input: ScheduleTargetInput.fromText(payload),
    messageGroupId,
});

new Schedule(this, 'Schedule', {
    schedule: ScheduleExpression.rate(Duration.minutes(1)),
    target
});

Properties ​

deadLetterQueueoptionalIQueuedead_letter_queueoptionalIQueuedeadLetterQueueoptionalIQueueDeadLetterQueueoptionalIQueueDeadLetterQueueoptionalIQueue#
The SQS queue to be used as deadLetterQueue.

Default: no dead-letter queue

notes

The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.

inputoptionalScheduleTargetInputinputoptionalScheduleTargetInputinputoptionalScheduleTargetInputInputoptionalScheduleTargetInputInputoptionalScheduleTargetInput#
Input passed to the target.

Default: no input.

maxEventAgeoptionalDurationmax_event_ageoptionalDurationmaxEventAgeoptionalDurationMaxEventAgeoptionalDurationMaxEventAgeoptionalDuration= Duration.hours(24)#
The maximum age of a request that Scheduler sends to a target for processing.

Minimum value of 60. Maximum value of 86400.

messageGroupIdoptionalstringmessage_group_idoptionalstrmessageGroupIdoptionalStringMessageGroupIdoptionalstringMessageGroupIdoptional*string#
The FIFO message group ID to use as the target.

Default: no message group ID

This must be specified when the target is a FIFO queue. If you specify a FIFO queue as a target, the queue must have content-based deduplication enabled.

A length of messageGroupId must be between 1 and 128.

retryAttemptsoptionalnumberretry_attemptsoptionalint | floatretryAttemptsoptionalNumberRetryAttemptsoptionaldoubleRetryAttemptsoptional*float64= 185#
The maximum number of times to retry when the target returns an error.

Minimum value of 0. Maximum value of 185.

roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.

Default: created by target

notes

If none provided templates target will automatically create an IAM role with all the minimum necessary permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets will grant minimal required permissions.