DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Aws Tutorial

Introduction to AWS
AWS Global Infrastructure
Setting Up AWS
AWS IAM
AWS EC2
AWS VPC
AWS S3
AWS RDS
AWS Lambda
AWS ECS and EKS
AWS CloudWatch
AWS CodePipeline
AWS Cost Optimization
AWS Elastic Load Balancing
AWS Auto Scaling
AWS CloudFront
AWS Route 53
AWS DynamoDB
AWS ElastiCache
AWS SQS
AWS SNS
AWS EventBridge
AWS Step Functions
AWS API Gateway
AWS ECR
AWS EKS
AWS CloudFormation
AWS Elastic Beanstalk
AWS KMS
AWS Secrets Manager
AWS WAF and Shield
AWS CloudTrail
AWS Config
AWS Systems Manager
AWS Organizations
AWS EFS
AWS EBS Deep Dive
AWS Kinesis
AWS Athena
AWS CodeDeploy
AWS CodeCommit
AWS CDK
AWS SAM

AWS CloudTrail

PreviousPrev
Next

Learn how CloudTrail records AWS API activity, separates management and data events, and supports audit and investigation workflows.

AWS CloudTrail is the AWS audit service that records who did what, when, and from where across the account or organisation. For DevOps teams, it matters because it is essential for security review, compliance, change investigation, and proving that infrastructure changes are traceable. Instead of relying on one fragile manual configuration, you can design a repeatable service boundary that stays stable while the workload behind it changes.

Core ideas

The main ideas to understand are management events capture control plane actions such as creating instances or editing policies; data events capture object-level or item-level activity for selected services and are more detailed but can be higher volume; trails deliver logs to an S3 bucket for retention and wider analysis; and CloudTrail and CloudWatch are related but different because CloudTrail answers change history questions while CloudWatch answers runtime behaviour questions. These details shape architecture decisions, but they also shape day-to-day operations. When a team chooses defaults without understanding how the service behaves under failure, scale, or security review, the platform often becomes harder to debug than the application itself.

Event typeCoversExample
Management eventControl plane actionsCreateRole or StartInstances
Data eventResource-level accessS3 object read or Lambda invoke
Event lookupQuick investigationSearch recent activity in console

From an operations perspective, the goal is to decide what level of audit detail is necessary and ensure logs land in durable storage with access controls that preserve integrity. The comparison below highlights the choices that usually matter first. It is often better to start with a simpler design and add sophistication only after metrics, incidents, or delivery requirements prove the change is necessary.

Practical commands

aws cloudtrail describe-trails
aws cloudtrail lookup-events --max-results 10
aws s3 ls s3://my-cloudtrail-logs/

Practical CLI checks make the service easier to support in real environments. Use the commands below to inspect the current state and confirm that automation matches intent. Before you promote a change, verify trail scope, log bucket permissions, and retention expectations before relying on CloudTrail for incident response. A safe default is organisation-wide trails when multi-account environments are in scope. That discipline makes later troubleshooting, scaling, and security reviews far less painful.

Exercise

Audit service

What does AWS CloudTrail primarily record?

Exercise

CloudTrail versus CloudWatch

Which service is mainly for API audit history rather than metrics and alarms?

PreviousPrev
Next

Continue Learning

AWS KMS

Learn how AWS KMS manages encryption keys, supports envelope encryption, and integrates with storage and secrets services.

15 min·Intermediate

AWS Secrets Manager

Learn how AWS Secrets Manager stores, rotates, and retrieves credentials and API keys securely for applications and automation.

12 min·Intermediate

AWS WAF and Shield

Learn how AWS WAF filters web traffic and how Shield Standard and Shield Advanced help protect applications from DDoS events.

12 min·Intermediate

Explore Related Topics

Te

Terraform Tutorials

Manage AWS infrastructure as code

Li

Linux Tutorials

Essential Linux skills for working with EC2

On This Page

Core ideasPractical commands