Skip to content

Instantly share code, notes, and snippets.

@owfm
Last active May 15, 2020 19:26
Show Gist options
  • Save owfm/7aa38fe07f9e787bc426794792dbbf11 to your computer and use it in GitHub Desktop.
Save owfm/7aa38fe07f9e787bc426794792dbbf11 to your computer and use it in GitHub Desktop.
// storePromotions.js
import AWS from "aws-sdk";
const client = new AWS.DynamoDB.DocumentClient();
export const call = async (event, context) => {
const params = {
TableName: process.env.promotionsTable,
Item: {
decisionStatus: "decisionPending",
taskToken: event.taskToken,
details: event.employeeDetails,
},
};
return await client.put(params).promise();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment