What is CloudWatch Logs, and How Does it Differ from Metrics?


Configuring Log Groups and Streams

Example:


How to Send Logs to CloudWatch

From EC2

Use amazon-cloudwatch-agent for EC2 Logging (the newer solution)

  1. Install the CloudWatch Agent:

  2. Create the Configuration File:

  3. Start the CloudWatch Agent:

  4. Verify in CloudWatch Console:

From Lambda

Lambda functions automatically send logs to CloudWatch, which you can view in the Lambda console.

From VPC Flow Logs