When the function rollout or scaledown, we need the function to be gracefully shutdown to avoid losing the request or event.