Core Concepts and Purpose
AWS CloudTrail provides essential visibility into activities within your AWS account.
AWS CloudTrail is a global web service that provides a record of actions taken by users, roles, or AWS services in an AWS account. It serves as a "black box recorder" for an AWS account, capturing API calls and other events, answering "who did this" and "when did it happen," and is non-negotiable for security, compliance, and data governance. (source_page: 3)
AWS CloudTrail provides essential visibility into activities within your AWS account.
CloudTrail records AWS API calls and other events, providing detailed insights into activity across your AWS account.
The operational flow of CloudTrail involves several steps from event capture to delivery and potential integration.
CloudTrail categorizes captured activities into different event types to provide granular logging for various operational aspects.
Understanding CloudTrail's data retention policies and pricing model is crucial for cost management and compliance.
CloudTrail provides audit and security capabilities for a variety of scenarios.
A conceptual overview of navigating the AWS Management Console for CloudTrail.
💡 To manage and view CloudTrail events and configurations.
Search for “CloudTrail” in the AWS service search bar.
💡 To review captured management events for the past 90 days.
Navigate under the “Event history” tab. Options to filter by “Event name” or “Username.” Event records are JSON documents containing details like accessKey, accountId, principalId.
💡 To configure long-term retention beyond 90 days, log data events, insight events, or network activity events, and customize logging settings.
Click “Create trail.”
- Trail Name: e.g., CS demo trail.
- Apply trail to all accounts in my organization: Option to log for all accounts or just the current one.
- Storage Location: Create a new S3 bucket or use an existing one. Option to use a prefix for logs within the bucket.
- SSE-KMS Encryption: Enable encryption for log files delivered to S3. Options to create a new KMS key or use an existing one.
- Additional Settings:
- Log file validation: Enables integrity validation.
- SNS Notification: Option to send notifications when logs are delivered.
- CloudWatch Logs: Option to deliver logs to CloudWatch Logs.
- Event Types:
- Management events (enabled by default, can be read/write or read-only/write-only).
- Data events (must be enabled for specific resources).
- Insight events (must be enabled).
- Network activity events (for VPC flow logs).
- Review and Create: Final step to confirm settings and create the trail.