This is part IV 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 monitor the health of Lambda functions and debug incoming requests. To achieve this, an `aws-embedded-metrics` package is installed and used to set up a telemetry logger. This logger provides metrics on Lambda execution, response status, and authentication results, which can be collected and visualized in CloudWatch. The logger also logs user-sensitive information to prevent data breaches. The code example demonstrates how to use the logger with different Lambda functions, including origin requests, origin responses, and viewer requests. The final step involves compiling the code, running Terraform, and testing the setup to see the logs on CloudWatch.