title: how to achieve idempotent behavior in lambda that writes to S3?
body: <p>I have a AWS lambda that does some calculation and writes output to S3 location. The AWS lambda is triggered by cloudwatch cron expression. Since the lambda can be triggered multiple times, I want to modify lamda  code such that it handles multiple triggers for the lambda. </p>
  
  <p>The only major side-effect for my lambda is writing to S3 and sending a mail. In this case, how do I ensure the lambda executes multiple times but still ensuring idempotent behavior?</p>