Automating Security Posture Management with AWS Security Hub
Security teams need one view of security posture across every account and Region, consistent checks against best practices, and automation that acts on what is found. AWS Security Hub provides this. This lesson explains Security Hub's standards and controls, organisation-wide central configuration, cross-Region aggregation, the finding format and integrations, and the automation features used to triage and remediate findings, together with Organizations, Control Tower and Systems Manager as the means to apply controls at scale.
Learning outcomes
After completing this lesson, you will be able to:
- Describe Security Hub security standards, controls and their relationship with AWS Config.
- Describe how Amazon Inspector scans EC2 instances, container images and Lambda functions continuously, and how it replaced Inspector Classic assessment templates.
- Explain delegated administration, central configuration policies and cross-Region aggregation.
- Explain how findings from other services are aggregated and normalised, and how automation rules and custom actions act on them.
- Describe how Security Hub, Organizations, Control Tower and Systems Manager combine to apply security controls across accounts and Regions.
Standards and Controls
Security Hub's cloud security posture management capability, called Security Hub CSPM, runs automated checks called controls against resources. Controls are grouped into security standards: AWS Foundational Security Best Practices (FSBP), the CIS AWS Foundations Benchmark, PCI DSS, NIST SP 800-53 and others. Each control, such as "S3 general purpose buckets should block public access" or "EC2 instances should require IMDSv2", produces a finding per resource with a status of passed or failed, and Security Hub calculates a security score per standard. Most controls are implemented as service-linked AWS Config rules, so AWS Config must be recording the relevant resource types in every account and Region where Security Hub runs.
AWS Security Hub has also evolved into a unified security service that correlates findings from Security Hub CSPM, Amazon GuardDuty, Amazon Inspector and Amazon Macie, identifies exposures that combine several risks, such as a vulnerable, internet-reachable instance with a powerful role, and presents them in the Open Cybersecurity Schema Framework (OCSF) format. The CSPM controls described in this lesson remain the posture management engine.
Organisation-Wide Configuration
Security Hub is enabled across an organisation from a delegated administrator, usually the security tooling account. With central configuration, the administrator creates configuration policies that specify whether Security Hub is enabled, which standards are enabled and which controls are disabled or customised with parameters, and associates them with the organisation root, OUs or accounts. Policies apply to current and new accounts in all linked Regions, and member accounts cannot change centrally managed settings. Different OUs can have different policies, for example PCI DSS for payment accounts.
Cross-Region aggregation designates a home Region and linked Regions; findings, insights and control status from linked Regions are replicated to the home Region, so the security team works in one place. Combined with delegated administration, this gives a single pane of glass for every account and Region.
Security Hub at scale
Findings, Integrations and Automation
Security Hub receives findings from AWS services, including GuardDuty, Inspector, Macie, IAM Access Analyzer, Firewall Manager, Systems Manager Patch Manager and Config, and from third-party products. CSPM findings use the AWS Security Finding Format (ASFF), a common JSON schema with fields such as severity, resources, compliance status and workflow status, so all findings can be filtered and processed the same way. All findings are sent to EventBridge as Security Hub Findings - Imported events.
Three features act on findings. Automation rules update finding fields automatically when criteria match, for example raising severity for production accounts, suppressing findings for an accepted risk on specific resources, or adding notes, and they run in order as findings are ingested. Custom actions let an analyst send selected findings to EventBridge for a response workflow. EventBridge rules on imported findings drive fully automated responses, such as remediation runbooks or ticket creation. AWS publishes the Automated Security Response on AWS solution, which deploys remediation runbooks for many Security Hub controls, triggered automatically or by custom actions, across accounts.
| Feature | Acts | Typical use |
|---|---|---|
| Automation rules | Automatically, inside Security Hub, on finding fields | Severity adjustment, suppression, enrichment |
| Custom actions | When an analyst chooses | Human-approved remediation |
| EventBridge rules | Automatically, outside Security Hub | Notifications, tickets, automated remediation |
Automate the findings
Finding Vulnerabilities with Amazon Inspector
Security Hub controls check how resources are configured; they do not look inside the software that runs on them. A perfectly configured instance can still run an operating system package with a known remote-code-execution flaw, and a container image can carry a vulnerable library pulled in by a dependency. Amazon Inspector fills this gap. It is an automated vulnerability management service that discovers workloads, scans them for software vulnerabilities and unintended network exposure, and sends prioritised findings to Security Hub and EventBridge.
Inspector scans three kinds of workload. Amazon EC2 instances are scanned for operating system and package vulnerabilities, either through the SSM Agent (agent-based) or by analysing EBS snapshots without an agent (agentless), and are also checked for network reachability, meaning ports that can be reached from outside the VPC through the combination of security groups, network ACLs, route tables and gateways. Amazon ECR container images are scanned when they are pushed and rescanned continuously, which is what ECR enhanced scanning provides. AWS Lambda functions are scanned for vulnerable package dependencies and, with Lambda code scanning, for flaws in the function code itself, such as injection weaknesses or hard-coded credentials.
The current Inspector scans continuously. It rescans a resource when the resource changes, for example when a package is installed or a new image is pushed, and when a new vulnerability is published in its database, so a finding can appear for an image that has not changed since it was pushed. Each finding has an Inspector score, which starts from the vulnerability's CVSS base score and adjusts it for the environment, such as whether the affected instance is reachable from the internet and whether a public exploit exists. This lets teams patch the exposed, exploitable cases first. In an organisation, Inspector is enabled through a delegated administrator account that activates scanning automatically for new member accounts.
The exam guide mentions "common assessment templates". This is the terminology of Amazon Inspector Classic, which has reached end of support. Classic required the team to install an agent, define assessment targets, create an assessment template that selected rules packages, such as Common Vulnerabilities and Exposures, CIS Operating System Security Configuration Benchmarks, Network Reachability and Security Best Practices, and then run assessments on a schedule. The current service replaces these templates with automatic discovery and continuous scanning; the vulnerability and network reachability packages map to its standard scanning, and CIS benchmark checks for EC2 are run through CIS scan configurations. A scenario that asks how to detect new vulnerabilities across a fleet as soon as they are published therefore points to activating Inspector, not to scheduling assessment runs.
Applying Controls Across Accounts and Regions
Security Hub detects control failures, but controls themselves are applied by several services working together, as the exam guide lists. The combination is summarised below.
| Service | Role in applying controls at scale |
|---|---|
| AWS Organizations | SCPs and RCPs prevent actions; declarative policies enforce configurations; delegated administrators run security services centrally |
| AWS Control Tower | Preventive, detective and proactive controls applied to OUs; account baselines for logging and Config |
| AWS Security Hub | Detects failures against standards across all accounts and Regions; central configuration of standards |
| AWS Config | Records resources and evaluates rules; remediation actions |
| AWS Systems Manager | Automation runbooks for remediation across accounts and Regions; patch and configuration compliance |
| CloudFormation StackSets | Deploys baseline resources, roles and rules to every account |
Security Hub in exam scenarios
When a scenario asks for a single view of security findings and compliance across all accounts and Regions with the least effort, the answer is Security Hub with a delegated administrator, central configuration and cross-Region aggregation, with AWS Config enabled everywhere.
Organisation-Wide Posture Management
A company with 120 accounts in four Regions wants all accounts checked against AWS FSBP, payment accounts also against PCI DSS, findings in one Region, high-severity findings in production sent to the on-call team, and some public bucket findings for an approved website suppressed.
-
Prerequisites
Ensure AWS Config records in all accounts and Regions through Control Tower or StackSets.
-
Administration
Designate the security tooling account as Security Hub delegated administrator and set eu-west-1 as the home Region, linking the other three Regions.
-
Configuration policies
Associate an FSBP policy with the root and an FSBP plus PCI DSS policy with the Payments OU.
-
Automation
Create an automation rule that suppresses the public access finding for the website bucket ARN, and an EventBridge rule for HIGH and CRITICAL findings from production accounts that notifies the on-call team and opens OpsItems.
Security Hub is enabled in a new account, but most controls show no data. What is the likely cause?
Show answer
AWS Config is not recording in that account and Region. Most Security Hub controls rely on service-linked Config rules and therefore on the Config recorder.
Exam Tips
Remember for the exam
- Security Hub CSPM controls (FSBP, CIS, PCI DSS, NIST) use AWS Config rules; Config must record in every account and Region.
- Use a delegated administrator, central configuration policies by OU and cross-Region aggregation to a home Region.
- Findings use ASFF and reach EventBridge as Security Hub Findings - Imported events.
- Automation rules modify findings automatically; custom actions send chosen findings to EventBridge; EventBridge rules drive automated remediation.
- Organizations, Control Tower, Config, Systems Manager and StackSets apply the controls that Security Hub verifies.
- Software vulnerabilities in EC2, ECR images and Lambda: Amazon Inspector, which scans continuously; assessment templates and scheduled runs belong to the retired Inspector Classic.