title: How do I fail a specific SQS message in a batch from a Lambda?
body: <p>I have a Lambda with an SQS trigger.  When it gets hit, a batch of records from SQS comes in (usually about 10 at a time, I think). If I return a failed status code from the handler, all 10 messages will be retried.  If I return a success code, they'll all be removed from the queue.  What if 1 out of those 10 messages failed and I want to retry just that one?</p>
  
  <pre><code>exports.handler = async (event) =&gt; {
  
      for(const e of event.Records){
          try {
              let body = JSON.parse(e.body);
              // do things
          }
          catch(e){
              // one message failed, i want it to be retried
          }        
      }
  
      // returning this causes ALL messages in 
      // this batch to be removed from the queue
      return {
          statusCode: 200,
          body: 'Finished.'
      };
  };
  </code></pre>
  
  <p>Do I have to manually re-add that ones message back to the queue?  Or can I return a status from my handler that indicates that one message failed and should be retried?</p>