Planning your next steps

Well, we have covered a lot about CloudWatch in this chapter; however, there are a few things that I would really recommend you to try out next. First off is exporting your log data to S3. Although an optional step, exporting your logs over to S3 can be really beneficial in terms of analyzing and monitoring your application's as well as your instance's performance and trends. How do you get started with this? Well, it's very simple!

You will need to first create an S3 bucket in the same region as that of your log data. Next, provide a set of permissions to your S3 bucket so that it and its contents are writeable by CloudWatch Logs. You can use an IAM policy or even use S3's access polices for the same. Finally, create a CloudWatch Logs Export task that includes your log group's name as the input and the S3 bucket's destination as the output. That's it! You can read more about the detailed steps required for exporting logs to S3 at http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/S3ExportTasks.html.

The second thing worth trying out is log data processing using Amazon Kinesis. Why is this so important? Well to be honest, CloudWatch Logs is a good tool, but it is not designed to process and handle large log files that too close to real time. That's where Amazon Kinesis comes into play! Kinesis is a managed service used for the rapid processing of large amounts of data, particularly logs, application usage statistics, and so on. Working with Kinesis is pretty straightforward. To begin with, you will first need to create a Kinesis stream. This is where your log events will be delivered to for processing. Next, you will need to create something called as a subscription filter using CloudWatch. A subscription filter basically will filter out the required log events from your log data using a defined filter pattern. These log events are then sent to the Amazon Kinesis stream for further analysis and processing. You can read more about subscription filters and Amazon Kinesis at http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/Subscriptions.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset