This is part III of a series on building a CloudFront distribution that serves S3 Media, performs on-demand image transformation, and authenticates incoming requests. The goal is to streamline error responses and add authentication to the distribution. A new origin-response Lambda@Edge function is created to rewrite error responses, while a viewer-request Lambda@Edge function is added for authentication. The functions are attached to CloudFront using Terraform, and the code is compiled using Rollup. The final result allows for normalized error responses and authentication, with the next step being to add logging and monitoring metrics.