Maruful shows you how
to monitor logs on multiple
Amazon EC2 instances


How can I simplify the process of monitoring logs on multiple Amazon Elastic Compute Cloud (Amazon EC2) instances?

You can easily monitor logs on multiple Amazon EC2 instances by using Amazon CloudWatch Logs with AWS OpsWorks Stacks. You can enable CloudWatch Logs at the layer level in Linux-based stacks for Chef 11.10 and Chef 12.

Note: If you're using a custom instance profile that isn't created by AWS OpsWorks, then you must manually attach the AWSOpsWorksCloudWatchLogs policy to your profile. For more information, see Managing IAM Policies.

  1. Open the OpsWorks Stacks console.
  2. In the Stack name column, choose the stack that you want to enable with CloudWatch Logs.
  3. In the navigation pane, choose Layers, and then choose CloudWatch Logs.
    Important: To enable CloudWatch Logs, you need an OpsWorks agent that's compatible with CloudWatch Logs and an IAM policy. You're prompted to upgrade to the latest OpsWorks agent version if your settings don't meet this requirement. If prompted, select the required check boxes, and then choose Upgrade.
  4. For CloudWatch Logs integration, choose On.
  5. To stream command logs, for Stream command logs, choose Yes.
  6. To enable custom logs, for Stream custom logs, enter the full path of the log file.
  7. Choose Save.
  8. To view the log streams for OpsWorks Stacks, open the Amazon CloudWatch console, and then choose Logs.
    Note: The log streams for OpsWorks Stacks take 1–5 minutes to show up in the CloudWatch console.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2019-01-15