In this recipe, we will learn how to integrate CloudWatch with CloudTrail. Once integrated, we can create metric filters and alarms within CloudWatch based on CloudTrail logs. We will also learn how to use the CloudFormation template provided by AWS to create a set of alarms within CloudWatch that use CloudTrail logs.
Integrating CloudWatch and CloudTrail
Getting ready
Create a trail by following the Creating a trail in CloudTrail recipe of this chapter. I have called my trail aws-sec-cookbook-trail.
You can also perform the steps in this recipe while creating a trail by making minor modifications to them.