Shrestha Rajat

Search

Search IconIcon to open search

Last updated Jul 9, 2023 Edit Source

# CloudTrail

#aws #cloud #auditing #logs #monitoring

Logs API calls between AWS services. when you need to know who to blame.

enables governance, complience, operational auditing and risk auditing of aws account.

used to monitor API calls and actions made by a user.

Ehere Source IP address When EventTile Who User, UserAgent What Region, Resource, Action

CloudTrail is already logging by default and will collect logs for last 90 days via Event History.

If you need more than 90 days you need to create a Trail

Trails are output to S3 and do not have GUI like Event History. You can use Amazon Athena to analyze these Event Histories.

# CloudTrail to CloudWatch

CloudTrail can be set to deliver events to a CloudWatch Logs.

# Management vs Data Events

There are two types of events in cloid trail. Pasted image 20220724020553

# Use Cases

CloudTrail logs API activity for auditing. All management events are logged and retained for 90 days. Trail logs any events to S3 for indefinite retention and can be within Region or all Regions CloudWatch Events can triggered based on API calls in CloudTrail. Events can be streamed to CloudWatch Logs which could be streamed and Metric filter could be used to perform any actions.

Pasted image 20220724020844