Changes to FaunaDB Documents -> AWS SQS
@dylburger
code:
data:privatelast updated:3 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 800,000+ developers using the Pipedream platform
steps.
trigger
active
last updated:-last event:-
steps.
send_message_to_sqs
Sends a message to an SQS queue
auth
(auths.aws)
params
AWS Region

The AWS region tied to your SQS queue, e.g us-east-1 or us-west-2

 
us-west-2
string ·params.region
SQS Queue URL
 
string ·params.QueueUrl
Event data

A variable reference to the event data you want to send to the event bus (e.g. event.body)

{{event}}
string ·params.eventData
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
}
20
const AWS = require('aws-sdk')
const { accessKeyId, secretAccessKey } = auths.aws
const { region, QueueUrl, eventData } = params

const sqs = new AWS.SQS({
  accessKeyId,
  secretAccessKey,
  region
})

// This sends the payload to the SQS queue, and assumes the payload is JSON. 
// Please modify the code accordingly if your data is in a different format
const sqsParams = {
  MessageBody: JSON.stringify(eventData),
  QueueUrl,
}

this.res = await sqs.sendMessage(sqsParams).promise()