Create Interactive Contests and Promotions
Creates a Step Function State Machine to publish a message to an SNS topic at a specific timestamp. The SNS topic delivers the message to this Pipedream source, and the source emits it as a new event.
Emit new event when a registered user submits a participation in the promotion.
Creates an SNS topic in your AWS account. Messages published to this topic are emitted from the Pipedream source.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
easypromos: {
type: "app",
app: "easypromos",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.easypromosapp.com/v2/promotions`,
headers: {
Authorization: `Bearer ${this.easypromos.$auth.api_key}`,
},
})
},
})
The AWS API unlocks endless possibilities for automation with Pipedream. With this powerful combo, you can manage your AWS services and resources, automate deployment workflows, process data, and react to events across your AWS infrastructure. Pipedream offers a serverless platform for creating workflows triggered by various events that can execute AWS SDK functions, making it an efficient tool to integrate, automate, and orchestrate tasks across AWS services and other apps.
import AWS from 'aws-sdk'
export default defineComponent({
props: {
aws: {
type: "app",
app: "aws",
}
},
async run({steps, $}) {
const { accessKeyId, secretAccessKey } = this.aws.$auth
/* Now, pass the accessKeyId and secretAccessKey to the constructor for your desired service. For example:
const dynamodb = new AWS.DynamoDB({
accessKeyId,
secretAccessKey,
region: 'us-east-1',
})
*/
},
})