Region tied to your EventBridge event bus, e.g. us-east-1 or us-west-2
The name of the EventBridge event bus
A variable reference to the event data you want to send to the event bus (e.g. event.body)
async
(params, auths) => {
}
const AWS = require("aws-sdk")
const { accessKeyId, secretAccessKey } = auths.aws
const { region, EventBusName, eventData } = params
const eventbridge = new AWS.EventBridge({
accessKeyId,
secretAccessKey,
region,
})
// See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EventBridge.html#putEvents-property
const putEventsParams = {
Entries: [
{
Detail: JSON.stringify(eventData),
DetailType: Object.keys(eventData).join(" "),
EventBusName,
Source: 'pipedream',
},
]
}
this.res = await eventbridge.putEvents(putEventsParams).promise()