Interview Prep/DevSecOps/Cloud Security, CIS and Compliance

What should you know about CloudTrail configuration?

IntermediateConceptCloud Security, CIS and Compliance
Answer

Management events (control-plane calls like CreateUser) are logged by default for 90 days in Event history, but you need a trail for retention and alerting. Data events (S3 object reads, Lambda invokes) are off by default and billed separately.

aws cloudtrail create-trail --name org-trail \
  --s3-bucket-name acme-cloudtrail-logs \
  --is-organization-trail --is-multi-region-trail \
  --enable-log-file-validation --kms-key-id alias/cloudtrail

Send it to a separate log-archive account with S3 Object Lock, so a compromised workload account cannot delete evidence. Alert on StopLogging and DeleteTrail.

All DevSecOps questions Roadmap: Policy as code

More on Cloud Security, CIS and Compliance