A company has a serverless application comprised of Amazon CloudFront, Amazon API Gateway, andAWS Lambda functions. The current deployment process of the application code is to create a new version
number of the Lambda function and run an AWS CLI script to update. If the new function version has errors,
another CLI script reverts by deploying the previous working version of the function. The company would like
to decrease the time to deploy new versions of the application logic provided by the Lambda functions, and also
reduce the time to detect and revert when errors are identified.
How can this be accomplished?