Logging and monitoring is a very important aspect of security management in any infrastructure or cloud. Logging enables you to capture exactly what is happening in your complete system, whereas monitoring lets you observe and raise an alarm if anything goes wrong. In AWS, we have CloudTrail for logging and CloudWatch for monitoring. Both these tools help us ensure our infrastructure is in compliance with almost all the security compliances, be it PCI, SOC, FEDRAMP, and so on.
Let's understand the logging in CloudTrail first, and then we will dive deep into CloudWatch.