title: DynamoDB PutCommand V3 - Return item
body: <p>I'm migrating a project with the V3 sdk of AWS for DynamoDB on NodeJS.</p>
  <p>In V2 there was no problem retrieving data during the PUT operation with the DocumentClient API. The method returns the item inserted without any problem.</p>
  <p>I'm not sure why the V3 putCommand doesn't do the same. The operation happens as expected and I can see the item inserted in my DB but I don't know if it is possible to return the inserted item.</p>
  <p>I've spent hours reading the aws docs but I can't find the solution. I have to say that the AWS docs are not pretty clear from my opinion</p>
  <p>Here is an example of my code:</p>
  <pre><code>const { DynamoDBClient } = require(&quot;@aws-sdk/client-dynamodb&quot;);
  const { DynamoDBDocumentClient, PutCommand } = require('@aws-sdk/lib-dynamodb');
  
  async writeItemHelper(tableName, item) {
          const marshallOptions = {
              convertEmptyValues: true,
              convertClassInstanceToMap: true
          }
  
          this.rawClient = new DynamoDBClient({ region: process.env.AWS_REGION })
          this.client = DynamoDBDocumentClient.from(this.rawClient, { marshallOptions })
  
          try {
              const command = new PutCommand({ TableName: tableName, Item: item} )
              const cmdResult = await this.client.send(command)
              return cmdResult;
          } catch (err) {
              console.error(`DynDB::writeItem ${JSON.stringify(err)}`);
              throw {error: err};
          }
  
  </code></pre>
  <p>And here is the response:</p>
  <pre><code>{
    &quot;$metadata&quot;: {
      &quot;httpStatusCode&quot;: 200,
      &quot;requestId&quot;: &quot;698LOHMFMO7NHPC1TG7MLRVE7VVV4KQNSO5AEMVJF66Q9ASUAAJG&quot;,
      &quot;attempts&quot;: 1,
      &quot;totalRetryDelay&quot;: 0
    },
    &quot;Attributes&quot;: undefined,
    &quot;ConsumendCapacity&quot;: undefined,
    &quot;ItemCollectionMetrics&quot;: undefined
  }
  </code></pre>
  <p>As you can see the operation works as expected but there is no any info about the item inserted. Do you know if there is any config that I'm missing?</p>
  <p>Thank you so much
  J.</p>