How to return the inserted item in dynamoDB
<p>I am using nodeJS sdk to put the item to dynamoDB, The item is:</p>

<pre><code>{
   "eventId": date + '-' + eventName + '-' + eventPurpose,
   "eventName": eventName,
   "eventPurpose": eventPurpose,
   "eventDates": eventDates,
   "attendees": attendees
 }
</code></pre>

<p>The present code for the putting the item in dynamoDB:</p>

<pre><code>  const params = {
    TableName: "event",
    Item: {
        "eventId": date + '-' + eventName + '-' + eventPurpose,
        "eventName": eventName,
        "eventPurpose": eventPurpose,
        "eventDates": eventDates,
        "attendees": attendees
    },
    ReturnValues: "ALL_OLD"
  };

  dynamo.put(params, (err, data) =&gt; {
    console.log("coming here");
    if (err) {
      console.log("error : " + JSON.stringify(err));
    }
    console.log("data" + JSON.stringify(data));
    cb(null, data);
  });
</code></pre>

<p>The insertion happens correctly and the return value is an empty object.</p>

<p>I would like to return the inserted item. I found this <a href="http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#API_PutItem_RequestSyntax" rel="noreferrer">doc</a>. But this returns only in case of updating the old value. I could not find any other useful info other than this.</p>

<p>Is there any work around or we simply need to <strong>query using get method  with the primary key?</strong></p>