In AWS, which detection service would you reach for to spot an active attack, to catch drift from a security baseline, to find known CVEs in running workloads, and to locate personal data sitting in S3 — and what does Security Hub add on top of them?
answer
- four questions, four services
- threats, drift, CVEs, data
- one of them only aggregates
- Config remembers state over time
- Security Hub speaks ASFF
basics
~20 sGuardDuty detects active threats from AWS logs, AWS Config records resource state and flags drift from rules, Amazon Inspector scans workloads for known CVEs, and Macie finds sensitive data in S3. Security Hub aggregates all of their findings.
solid answer
~40 sEach of these services answers a different question. **Amazon GuardDuty** is the threat detector: it continuously analyses AWS-side telemetry (CloudTrail events, VPC Flow Logs, DNS queries) and raises findings like credential exfiltration or crypto-mining. **AWS Config** is the state recorder: it snapshots resource configuration over time and evaluates rules, so it answers "is this bucket compliant, and when did it change?" **Amazon Inspector** scans EC2 instances, ECR images and Lambda functions for known CVEs in the software you shipped. **Macie** samples and classifies S3 objects to find personal data. **Security Hub** detects nothing itself — it ingests findings from all of the above in a common format, runs standards controls such as the AWS Foundational Security Best Practices, and gives you one cross-account, cross-Region queue instead of five consoles.
go deeper
Be able to name the service for each job in one sentence each: GuardDuty for threats, Config for drift, Inspector for CVEs, Macie for sensitive data, Security Hub to collect it all.
Explain what each service actually consumes — logs, configuration items, package inventory, object content — and why Security Hub's own controls depend on AWS Config being enabled.
Show how you would wire findings into an actual response path via EventBridge, and account for the fact that every one of these services is per-Region and per-account.
Own the decision of which services are mandatory org-wide versus opt-in per workload, and be ready to defend that choice on cost, coverage gaps and the volume of findings the organisation can realistically triage.
## Why there are several services, not one Security questions on AWS fall into distinct shapes, and AWS ships a separate managed service per shape. Knowing which one answers which question is the single most-asked thing about this layer, because it is the first step of almost every AWS security design discussion. The four detection questions are: 1. *Is someone doing something malicious right now?* — behavioural, log-driven, real time. 2. *Does my infrastructure still match the baseline I agreed to?* — configuration state, evaluated against rules. 3. *Does the software I am running have known vulnerabilities?* — package inventory matched against a CVE feed. 4. *Is regulated or personal data sitting somewhere it should not be?* — data content classification. ## GuardDuty — threat detection from telemetry GuardDuty consumes AWS-side logs and applies threat intelligence, anomaly detection and machine learning to them. It produces *findings* with a structured type string and a severity, for example `UnauthorizedAccess:EC2/SSHBruteForce` or `CryptoCurrency:EC2/BitcoinTool.B!DNS`. It is behavioural: it tells you an instance's credentials were used from an unusual location, not that the instance is misconfigured. You turn it on per account and per Region; there is nothing to deploy for the foundational sources. ## AWS Config — configuration state and drift Config records a *configuration item* every time a supported resource changes, storing a timeline of resource state. Rules — AWS-managed ones such as `S3_BUCKET_PUBLIC_READ_PROHIBITED` or `IAM_USER_MFA_ENABLED`, or custom ones — evaluate resources as COMPLIANT or NON_COMPLIANT. Config answers historical questions ("was this security group ever open to the world, and who changed it?") that a live API call cannot. It is the compliance and drift engine, not a threat engine. ## Amazon Inspector — vulnerability scanning Inspector builds a software inventory of EC2 instances, container images in ECR and Lambda functions, matches it against vulnerability databases, and continuously re-evaluates when new CVEs are published — so a finding can appear on an instance you have not touched in months. Findings carry the CVE, a score and whether a fix exists. ## Macie — sensitive data discovery Macie inventories S3 buckets (including their public-access and encryption posture) and samples object content, classifying it with managed data identifiers for things like credit-card numbers, names and credentials. You can also run targeted classification jobs over specific buckets. Because it reads object bytes, it is priced per gigabyte inspected, which is why sampling exists. ## Security Hub — aggregation, not detection Security Hub is the fan-in point. Other services (and third-party tools) send findings in the **AWS Security Finding Format (ASFF)**, a normalised JSON schema, so a GuardDuty finding, an Inspector CVE and a failed control all carry comparable severity, resource and account fields. On top of ingestion it runs *security standards* — packaged control sets such as the AWS Foundational Security Best Practices standard and the CIS AWS Foundations Benchmark — and reports a score per standard. In an Organization you nominate a delegated administrator account and aggregate findings from every member account into one Region. The common misconception to avoid: Security Hub is not a detector with its own sensors. Its own controls are largely evaluated through AWS Config rules, so a Security Hub with Config switched off will show controls that never evaluate. ## How they compose ```text GuardDuty (threats) \ Inspector (CVEs) >--> Security Hub (ASFF) --> EventBridge --> ticket / chat / Lambda Macie (data) / Config (drift) / ``` Every one of these is **regional**: enabling a service in one Region tells you nothing about activity in another, which is exactly why attackers favour Regions nobody watches. Enable them in every Region you allow, and use Organizations auto-enable so new accounts are covered on creation rather than by someone remembering. ## What an interviewer is checking That you can map a scenario to a service in one sentence, that you know Security Hub aggregates rather than detects, and that you do not reach for Config to catch an attacker or for GuardDuty to prove a bucket was never public.
- Where does IAM Access Analyzer sit relative to these services?It is a different kind of check: it reasons about resource policies to report which resources are reachable from outside your account or Organization, rather than watching logs or object content. Its findings also flow into Security Hub, so it shows up in the same queue, but it is policy analysis, not behavioural detection or configuration recording.
- If GuardDuty raises a finding, how do you get it into a ticket or a chat channel?GuardDuty publishes findings as EventBridge events with a `detail-type` of `GuardDuty Finding`, so you write an EventBridge rule that filters on source, type or severity and targets an SNS topic, a Lambda function or a Step Functions workflow. The same pattern works for Security Hub findings, which is the usual choice once several sources are aggregated.
- Which of these services would you enable first in a brand-new account, and why?GuardDuty, because it needs no configuration, no agents and no data-source setup, and it catches the failure that hurts soonest — leaked credentials being used. AWS Config comes next since Security Hub's controls depend on it. Inspector and Macie follow once there are actual workloads and data worth scanning.
saying these in an interview costs you the question
- Says Security Hub scans resources and detects threats itself
- Reaches for AWS Config to spot an in-progress attack
- Thinks GuardDuty scans instances for missing patches or CVEs
- Assumes enabling a service in one Region covers the whole account
- Confuses Macie (data content) with Inspector (software vulnerabilities)