Utility to implement idempotency of Lambda functions