AWS Learning Journey

Who Changed That? CloudTrail, Config, GuardDuty, and the AWS Security Toolbox

Something changed in production at 2 a.m. AWS recorded it. Here's how to find out who did what — and how to catch the next problem before it becomes an incident.

10 min read · 1858 words
AWSCloud SecurityComplianceDevSecOpsCloud Governance
Who Changed That? CloudTrail, Config, GuardDuty, and the AWS Security Toolbox cover image

AWS from Zero to Production — Phase 2, Part 5 of 6 · See the full series roadmap


Monday morning. The S3 bucket that feeds your dashboards is suddenly public. Nobody on the team remembers changing it.

Who did it? When? From where? Was it a person, a script, or a compromised key? And are there other buckets like it?

On AWS, these questions have answers — if the right tools are turned on. Every API call can be recorded. Every configuration change can be tracked. Suspicious behavior can be flagged automatically.

This article is your map of the AWS governance and security toolbox: what each service does, when you need it, and how they fit together.

What you’ll walk away with


The governance toolbox at a glance

Each tool answers a different question:


AWS CloudTrail: the flight recorder

CloudTrail records API activity in your account — console clicks, CLI commands, SDK calls, and actions AWS services take on your behalf.

Each event includes:

Event history vs. trails

Management events vs. data events

Finding the answer to “who changed that?”

aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=EventName,AttributeValue=PutBucketPolicy \
  --max-results 5 \
  --query "Events[].{Time:EventTime,User:Username,Event:EventName}" \
  --output table

Engineer’s note: Send organization trails to a bucket in a separate Log Archive account — the one from the Phase 1 account layout. Enable log file validation so you can prove logs haven’t been tampered with, and restrict who can delete them.


AWS Config: the configuration time machine

AWS Config records the configuration of your resources over time, plus how they relate to each other.

With Config, you can:

Config vs. CloudTrail

Use them together to answer both halves of “what happened?”

Cost note: Config charges per configuration item recorded and per rule evaluation. In busy accounts, recording every resource type continuously can get expensive. Start with the resource types and rules you actually need, and check current pricing.


Threat detection and vulnerability management

Amazon GuardDuty — threat detection

GuardDuty continuously analyzes signals such as CloudTrail events, VPC flow logs, and DNS logs to detect threats, for example:

You don’t need to configure the underlying logs yourself — GuardDuty reads them directly. New accounts get a free trial; check current pricing for ongoing use.

Amazon Inspector — vulnerability scanning

Inspector automatically scans workloads for known software vulnerabilities and unintended network exposure:

Findings include severity scores and remediation guidance. You’ll want this once you start building container images in Phase 4.

Amazon Macie — sensitive data discovery

Macie uses pattern matching and machine learning to find sensitive data in S3, such as personal information, financial data, and credentials. It also flags buckets that are public or shared outside your account.

Engineer’s note: Macie matters most for data platforms — like the data lake you’ll build in Phase 9. Knowing where personal data lives is the first step to protecting it.


AWS Security Hub CSPM: one view of your posture

AWS Security Hub Cloud Security Posture Management (CSPM) — long known simply as Security Hub — brings it together:

Security Hub CSPM uses AWS Config rules for most of its checks, so AWS Config must be enabled and recording resources. New accounts get a 30-day free trial.


Compliance: Artifact and Audit Manager

AWS Artifact

Artifact is a self-service portal for AWS’s own compliance documentation: SOC reports, ISO certifications, PCI attestations, and agreements such as a Business Associate Addendum.

Remember the shared responsibility model: Artifact proves AWS’s side. You still need evidence for your side.

AWS Audit Manager

Audit Manager automated evidence collection — from CloudTrail, Config, and Security Hub CSPM — and mapped it to controls in frameworks such as SOC 2, PCI DSS, and HIPAA.

Availability note: At the time of writing, AWS Audit Manager is no longer open to new customers. Existing customers can continue to use it. If you’re starting fresh, build your evidence from CloudTrail, Config conformance packs, and Security Hub CSPM reports, and check the Audit Manager documentation for AWS’s current guidance.

What counts as compliance evidence?

Auditors typically want proof that controls exist and operate continuously, for example:

The tools in this article generate most of that automatically — if you turn them on before the audit, not during it.


Organization-wide governance

In Phase 1, you learned how AWS Organizations and SCPs set guardrails. Here’s how they connect to security tooling:

Resource tagging standards

Governance depends on knowing what each resource is. Define a small, required set of tags, such as:

owner        = team-or-person
environment  = dev | staging | prod
project      = project-name
data-class   = public | internal | confidential

Enforce them with tag policies, Config rules, and Infrastructure as Code. The data-class tag is especially useful: it tells Macie findings, access reviews, and incident responders how sensitive a resource is.


The AWS Well-Architected Framework

The AWS Well-Architected Framework is AWS’s guide to building good systems, organized into six pillars:

  1. Operational excellence: running and improving systems
  2. Security: protecting data, systems, and assets
  3. Reliability: recovering from failures and meeting demand
  4. Performance efficiency: using resources efficiently
  5. Cost optimization: avoiding unnecessary cost
  6. Sustainability: minimizing environmental impact

The Well-Architected Tool in the console is free. It walks you through questions for each pillar and produces an improvement plan. We’ll use it in Phase 8 to review the platform we build.


A cost-aware security baseline

For a personal learning sandbox:

  1. CloudTrail event history — already on, free. Learn to search it.
  2. IAM Access Analyzer external access analyzer — no additional charge.
  3. GuardDuty — enable during the free trial to see what it reports, then decide.
  4. Budget alerts — already done in Phase 1.

For a team or production organization, add:

  1. An organization trail to a Log Archive account, with log file validation
  2. GuardDuty across all accounts and Regions
  3. AWS Config with the rules you need, plus Security Hub CSPM with the Foundational Security Best Practices standard
  4. Inspector once you run EC2, containers, or Lambda
  5. Macie for buckets that hold sensitive data
  6. SCPs that protect all of the above from being disabled

Cost note: Security services are usually billed by volume — events analyzed, resources recorded, or data scanned. Use free trials to see the real cost for your accounts before committing, and check current pricing.


Common mistakes


Key takeaways


Quick self-check

Test yourself before moving on:

  1. How long does CloudTrail event history keep management events?
  2. You need to know what a security group’s rules were last week. CloudTrail or Config?
  3. Which service would flag an EC2 instance talking to a known malicious IP address?
  4. What must be enabled for Security Hub CSPM to evaluate most of its controls?

Answers

  1. 90 days.
  2. AWS Config. CloudTrail tells you who changed it; Config shows the configuration itself over time.
  3. Amazon GuardDuty.
  4. AWS Config, recording the relevant resources.

What’s next

In Part 6, we put Phase 2 into practice: configure GitHub as an OIDC provider, create a deployment role locked to one repository and environment, and deploy to AWS without storing a single access key.

Which security tool has saved you from a real incident? Tell the story in the comments.


Share this article

LinkedIn post draft