Detection · Topic 4 of 7

Security Hub, Inspector and Macie

Compare Security Hub, Amazon Inspector and Amazon Macie, and learn how to aggregate findings from many accounts and Regions into one place for alerting.

  • 5 min
In a nutshell
  • Inspector scans EC2, ECR images and Lambda functions for vulnerabilities, and scans continuously rather than on a schedule.
  • Macie finds sensitive data in S3 only, and also reports bucket level policy findings.
  • Security Hub aggregates findings, runs security standard checks, and sends findings to EventBridge.

What it is

Three services widen detection beyond threat activity. Amazon Inspector finds software vulnerabilities and unintended network exposure, Amazon Macie finds sensitive data in Amazon S3, and AWS Security Hub collects findings from these and other sources into one place.

Think of Inspector and Macie as specialised scanners, and Security Hub as the dashboard and routing layer on top.

InspectorvulnerabilitiesfindingSecurity Hubaggregate and prioritiseMaciesensitive datafindingSecurity Hubaggregate and prioritiseGuardDutythreatsfindingSecurity Hubaggregate and prioritise

How it works

Amazon Inspector

Inspector scans for known vulnerabilities (CVEs, Common Vulnerabilities and Exposures) in three kinds of resource.

  • EC2 instances, using the Systems Manager (SSM) agent or an agentless scan that reads the volumes.
  • Container images in Amazon ECR (Elastic Container Registry).
  • Lambda functions, including their dependencies and, optionally, the code itself.

Inspector scans continuously. It rescans when a new vulnerability is published or when a resource changes, so you do not schedule scans. For EC2 it can also report network reachability, such as a port that is open to the internet.

Each finding carries an Inspector score that takes the environment into account, so a flaw on an internet facing instance ranks higher than the same flaw in an isolated one.

Amazon Macie

Macie inspects S3 buckets for sensitive data such as personal data and credentials, using managed data identifiers and any custom identifiers you define. It runs discovery jobs on selected buckets, or automated sensitive data discovery that samples across the account.

Macie raises two kinds of findings. Policy findings describe bucket changes such as public access or disabled encryption, and sensitive data findings describe what was found in an object. Macie covers S3 only, so it is the wrong answer for a question about databases.

AWS Security Hub

Security Hub receives findings from AWS services (GuardDuty, Inspector, Macie, IAM Access Analyzer, Firewall Manager and others) and from partner tools. The automated checks against security standards are the posture management capability, which AWS now names Security Hub CSPM (cloud security posture management).

The CSPM checks rely on AWS Config. If Config recording is not on, the controls cannot evaluate resources.

CapabilityWhat it gives you
Standards and controlsAutomated checks against AWS Foundational Security Best Practices, CIS and others
Finding aggregationOne list of findings from many services and accounts
Cross Region aggregationA designated aggregation Region that receives findings from linked Regions
Custom actionsA console button that sends selected findings to EventBridge
Automation rulesRules that update findings automatically, such as raising severity or suppressing known noise

Multi account design

Designate a delegated administrator for Security Hub, GuardDuty, Inspector and Macie, usually in a security tooling account rather than the management account. Turn on auto enable for new accounts.

For Security Hub, central configuration policies let the administrator define which standards and controls apply to which accounts and Regions. Cross Region aggregation then collects findings into one Region for a single view. Aggregation is for viewing and alerting, because the resources and the findings still originate in their own Regions.

# AWS CLI, in the Security Hub delegated administrator account
aws securityhub create-finding-aggregator --region us-east-1 \
  --region-linking-mode ALL_REGIONS

Alerting on findings

Security Hub sends findings to EventBridge, so an alert is a rule. This pattern matches high severity, new findings that are not yet resolved.

{
  "source": ["aws.securityhub"],
  "detail-type": ["Security Hub Findings - Imported"],
  "detail": {
    "findings": {
      "Severity": { "Label": ["HIGH", "CRITICAL"] },
      "Workflow": { "Status": ["NEW"] }
    }
  }
}

For manual triage, a custom action in the console sends only the findings you select to EventBridge. That fits a human decided response, while the rule above fits fully automatic handling.

Choosing between them

NeedService
Find vulnerable packages on instances, images or functionsInspector
Find personal data or secrets stored in S3Macie
See all findings in one view and check against standardsSecurity Hub
Detect an active threatGuardDuty
Check resource configuration against rules over timeAWS Config

What to remember for the exam

  • Inspector scans EC2, ECR images and Lambda functions for vulnerabilities, and scans continuously rather than on a schedule.
  • Macie finds sensitive data in S3 only, and also reports bucket level policy findings.
  • Security Hub aggregates findings, runs security standard checks, and sends findings to EventBridge.
  • Security Hub CSPM controls depend on AWS Config recording being enabled.
  • Use a delegated administrator in a security tooling account for all four services, with auto enable for new accounts.
  • Cross Region aggregation gives one view of findings, and you choose an aggregation Region.
  • A custom action sends selected findings to EventBridge for a manual trigger, and automation rules update findings in place.
  • Inspector findings include network reachability for EC2, and the score reflects environment context.
Exam tip

A question that asks for "a single pane of glass for security findings across accounts and Regions" points to Security Hub with a delegated administrator and cross Region aggregation.

Common mistakes

Choosing Macie for databases. Macie scans S3 objects, so another approach is needed for data in RDS or DynamoDB.

Turning on Security Hub without Config. The controls then show missing or failed evaluations, and the exam expects you to enable Config recording first.

Running tools from the management account. Best practice is a separate security account as delegated administrator.

Expecting Inspector to find threats. It finds weaknesses, not attacks, so an active compromise is GuardDuty territory.

Watch out

Aggregating findings to one Region does not turn services on in the other Regions. Each linked Region still needs the service enabled.

Check yourself

  • Which service continuously scans EC2, ECR images and Lambda for CVEs?

    Amazon Inspector, which rescans when new vulnerabilities are published or resources change.

  • What must be enabled before Security Hub controls can evaluate resource configuration?

    AWS Config recording, because the posture checks read configuration data from Config.

  • How do you get one view of findings from many Regions?

    Create a Security Hub finding aggregator that links the Regions into a chosen aggregation Region.

Topic 4 of 7 in Detection

Test yourself on Detection

The full AWS SCS-C03 question bank has 858 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.