Advertisement
Beginner AWS, AWS CloudTrail & Auditing

What is AWS CloudTrail and why is it important for security and compliance?

Short answer

AWS CloudTrail is a service that automatically records every API call and action taken within your AWS account, including who made the request, what action was performed, when it happened, and from where, providing a detailed audit trail that is essential for security…

Save AWS mock interview
Advertisement
AModel answer
AWS CloudTrail is a service that automatically records every API call and action taken within your AWS account, including who made the request, what action was performed, when it happened, and from where, providing a detailed audit trail that is essential for security investigations, compliance reporting, and understanding exactly what changes were made across your entire AWS environment over time.
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=DeleteBucket
Real-world example
A security team investigating an unexpected S3 bucket deletion uses CloudTrail logs to identify exactly which IAM user or role performed the deletion, along with the precise timestamp and source IP address of the request.
Likely follow-ups
  • Is CloudTrail enabled by default for every AWS account?
  • How long does CloudTrail retain event history by default?
Related topics