6.2 Amazon Inspector Vulnerability Management & Patch Automation
Key Takeaways
Amazon Inspector v2 delivers continuous, automated, and event-driven vulnerability scanning across Amazon EC2, Amazon ECR container images, and AWS Lambda functions without requiring scheduled scan assessments.
For EC2 findings, the Amazon Inspector score adjusts the CVSS base score (0–10) using network reachability and exploitability data from your environment, and findings add vulnerability intelligence such as CISA KEV listings and EPSS.
EC2 vulnerability scanning operates in dual modes: agent-based via the AWS Systems Manager (SSM) Agent for deep package inspection, and agentless scanning via EBS snapshot inspection for unmanaged or stopped instances.
AWS Systems Manager Patch Manager orchestrates automated operating system patching using custom patch baselines with auto-approval delay windows, patch groups, and scheduled maintenance windows.
Shift-left scanning uses Amazon Inspector code security (SAST, dependency, and IaC scans of connected repositories) and Amazon Q Developer; Amazon CodeGuru Security, which the exam guide names, was discontinued on November 20, 2025.
6.2 Amazon Inspector Vulnerability Management & Patch Automation
Traditional vulnerability management relied on periodic network port scans and manual agent-based assessment windows scheduled during off-peak hours. In dynamic cloud environments—where auto-scaling instances launch and terminate in minutes, container images are continuously deployed, and serverless functions run ephemerally—periodic scanning creates dangerous blind spots. A vulnerability introduced minutes after a weekly scan window remains invisible to security operations for days.
Amazon Inspector delivers continuous, automated, and context-aware vulnerability management across compute workloads. Integrated natively with AWS Systems Manager Patch Manager, Amazon EventBridge, and developer tooling like Amazon Inspector code security (the successor to Amazon CodeGuru Security) and Amazon Q Developer, security teams can establish end-to-end vulnerability discovery, risk prioritization, and automated remediation.
Evolution of Vulnerability Management: Inspector Classic vs Inspector v2
The SCS-C03 exam focuses heavily on the modern architecture of Amazon Inspector (often referred to as Inspector v2). Understanding the shift from legacy Inspector Classic to Inspector v2 is essential for selecting correct architectural solutions:
| Architectural Attribute | Amazon Inspector Classic (Legacy) | Amazon Inspector v2 (Current) |
|---|---|---|
| Scan Model | Periodic, scheduled assessment runs requiring predefined target groups. | Continuous and automated; triggers automatically on workload deployment or CVE update. |
| Host Agent | Dedicated, standalone AWS Inspector Agent requiring manual host installation. | Leverages the ubiquitous AWS Systems Manager (SSM) Agent; zero dedicated agent required. |
| Multi-Account Governance | Account-by-account configuration; manual cross-account role assumption. | Native AWS Organizations integration with designated Delegated Administrator account. |
| Target Coverage | Amazon EC2 instances only. | Amazon EC2, Amazon ECR container images, and AWS Lambda functions and layers. |
| Scoring Methodology | Static CVSS (Common Vulnerability Scoring System) base score. | Adjusted Inspector score for EC2 findings (CVSS-style 0–10) that reflects network reachability and exploitability, plus vulnerability intelligence. |
| Finding Management | Findings stored inside Inspector console; manual export required. | Consolidated streaming into AWS Security Hub and Amazon EventBridge in ASFF format. |
Amazon Inspector Continuous Scanning Across Compute Targets
Inspector v2 continuously inventories and scans three distinct compute tiers:
1. Amazon EC2 Scanning (Agent-Based & Agentless Hybrid)
Inspector scans EC2 instances for software vulnerabilities (Common Vulnerabilities and Exposures - CVEs) and unintended network exposure:
- Agent-Based Scanning (SSM Agent): For instances managed by AWS Systems Manager, Inspector continuously collects an inventory of installed application and operating system packages via the SSM Agent. No scanning binaries execute on the target host; inventory telemetry is processed out-of-band by Inspector against continuously updated CVE databases.
- Agentless Scanning (EBS Snapshot Analysis): For EC2 instances that lack the SSM Agent, have outdated agents, or reside in restricted network segments without SSM connectivity, Inspector provides Agentless Scanning. Inspector takes an ephemeral, point-in-time EBS snapshot of the root volume, mounts it to an isolated scanning environment managed by AWS, inspects installed packages, and immediately deletes the snapshot. Organizations can enable Hybrid Mode, which prioritizes SSM Agent-based scanning where available and automatically falls back to agentless snapshot scanning for unmanaged nodes.
- Network Reachability Analysis: Inspector evaluates whether an EC2 instance is reachable from the public internet by analyzing VPC route tables, Internet Gateways (IGWs), Elastic IP addresses, Security Groups, and Network Access Control Lists (NACLs) using technology derived from the VPC Reachability Analyzer.
2. Amazon ECR Container Image Scanning
When Enhanced Scanning is enabled in ECR, Inspector scans container images stored in private repositories:
- Continuous Rescanning: Unlike basic scan-on-push, Inspector continuously rescans images whenever new vulnerabilities are published in CVE databases. If an image was pushed 6 months ago and a zero-day vulnerability is announced today, Inspector identifies the vulnerability without requiring the image to be rebuilt or re-pushed.
- Scanning Duration Rules: Organizations can configure scan duration settings to optimize costs:
- You choose how long Inspector keeps rescanning an image after it is pushed or last pulled, from a short window (for example, 14 or 30 days) up to the image's lifetime, so dormant images stop generating findings.
- Language Dependency Scanning: In addition to Linux OS packages (Alpine, Debian, RPM), Inspector scans programming language packages, including Python (
pip), Node.js (npm), Java (maven), Go, and Ruby (gem).
3. AWS Lambda Function & Layer Scanning
Inspector automatically discovers and assesses all AWS Lambda functions and associated Lambda Layers within an account:
- Lambda Standard Scanning: Analyzes application package dependencies included directly in the Lambda deployment package or imported via Lambda Layers (e.g., outdated Python
requestsor Javalog4jlibraries). - Lambda Code Scanning: Performs static application security testing (SAST) on custom application code written inside the Lambda function. It identifies code-level security flaws including hardcoded AWS credentials, SQL injection, cross-site scripting (XSS), path traversal, and insecure deserialization.
Inspector Score vs Base CVSS Scoring
A critical conceptual area on the AWS Certified Security – Specialty exam is the fundamental distinction between a Base CVSS Score and the Inspector score.
The Failure of Raw CVSS in Production Prioritization
The Common Vulnerability Scoring System (CVSS) calculates a static mathematical score (ranging from 0.0 to 10.0) based on the intrinsic technical characteristics of a vulnerability (Attack Vector, Attack Complexity, Privileges Required, Scope, Confidentiality/Integrity/Availability Impact). However, CVSS evaluates vulnerabilities in a complete operational vacuum:
- A vulnerability with CVSS 9.8 (Critical) present on an EC2 instance located in an isolated, private subnet with zero internet routing, no inbound ports, and no available public exploit code represents a low real-world operational risk.
- Conversely, a vulnerability with CVSS 6.5 (Medium) on an internet-facing web server possessing active, weaponized exploit code in the wild (e.g., listed in CISA's Known Exploited Vulnerabilities catalog) represents an imminent, catastrophic operational threat.
How the Inspector Score Is Calculated
To eliminate alert fatigue and ensure security teams remediate actual attack vectors first, Amazon Inspector calculates an Inspector score for EC2 findings: a CVSS-style 0–10 value that re-scores the base metrics using your environment, mapped to Low, Medium, High, and Critical severity.
The calculation synthesizes three core inputs:
- Base CVSS Score: The foundational severity baseline provided by the National Vulnerability Database (NVD).
- Exploit Availability & Threat Intelligence: Inspector ingests real-time threat intelligence feeds, including the CISA Known Exploited Vulnerabilities (KEV) catalog, Exploit-DB, and internal AWS Security Intelligence. If active, weaponized exploit code exists, the risk score is drastically elevated.
- Network Path Exposure: Inspector queries VPC routing topology. If an instance has an open security group port and a route to an Internet Gateway, the score increases. If the instance is strictly private with no path from the internet, the score is adjusted downward.
| Finding Scenario | Base CVSS Score | Environmental Telemetry | Inspector Assessment | Operational Priority |
|---|---|---|---|---|
| Scenario A: Remote Code Execution CVE in web framework | 9.8 (Critical) | Target EC2 instance resides in a private subnet; no IGW route; no public IP; no exploit code available. | Score adjusted downward (no network path to exploit) | Deprioritize; patch during standard monthly maintenance window. |
| Scenario B: Moderate Information Disclosure CVE in SSL library | 6.2 (Medium) | Target EC2 instance is attached to a public subnet with an open 0.0.0.0/0 security group; active exploit code published in CISA KEV. | Score stays elevated; intelligence flags known exploitation (CISA KEV) on a reachable host | Immediate Escalation; trigger automated patching or instance isolation within 4 hours. |
Exam Tip: When an exam question asks how to prioritize remediation across thousands of EC2 and container findings without exhausting engineering bandwidth, the correct answer is to sort by the Inspector score and its vulnerability intelligence (known exploitation), not the raw CVSS score. The Inspector score accounts for actual network reachability and exploitability.
AWS Systems Manager Patch Manager & Automated Remediation
Discovering vulnerabilities is futile without automated remediation. AWS Systems Manager Patch Manager automates the patching of operating systems and application packages across EC2 instances and on-premises virtual machines at enterprise scale.
1. Patch Baselines
A Patch Baseline defines which patches are approved for installation across target instances:
- Default Baselines: AWS provides predefined patch baselines for each supported operating system (e.g.,
AWS-AmazonLinux2DefaultPatchBaseline,AWS-UbuntuDefaultPatchBaseline). Default baselines automatically approve all security-related operating system patches classified asCriticalorImportantafter an auto-approval delay. - Custom Patch Baselines: Organizations create custom baselines to define precise enterprise compliance criteria:
- Auto-Approval Rules: Specify patch approval conditions based on Product (e.g., Amazon Linux 2023), Classification (e.g.,
Security,Bugfix), and Severity (e.g.,Critical,Important,Medium). - Auto-Approval Delay (Days): A mandatory waiting period (e.g., 7 days) before newly released vendor patches are approved. This "soak period" prevents zero-day patch regressions and faulty vendor updates from corrupting production fleets.
- Compliance Severity Level: Assigns a compliance status (e.g.,
CRITICAL,HIGH) if an approved patch is missing from an instance during compliance audits. - Explicit Approval & Rejection Lists: Allows whitelisting specific mandatory patches or blacklisting specific broken package versions (e.g., rejecting a kernel version that conflicts with proprietary drivers).
- Auto-Approval Rules: Specify patch approval conditions based on Product (e.g., Amazon Linux 2023), Classification (e.g.,
2. Patch Groups
To prevent applying identical patching schedules across development and production environments, Patch Manager utilizes Patch Groups:
- A Patch Group is established by tagging target managed nodes with the key
Patch GrouporPatchGroup(case-sensitive; usePatchGroupwhen instance metadata tags are enabled) and a designated string value (e.g.,Key=Patch Group, Value=Production-Tier1orKey=Patch Group, Value=Development). - A custom Patch Baseline is then registered to that specific Patch Group string.
- AWS now recommends patch policies (Quick Setup) for patching across accounts and Regions; patch groups remain supported and are still tested.
- When a patching task executes, Patch Manager evaluates the node's
Patch Grouptag and applies exclusively the baseline registered to that group.
3. Maintenance Windows
A Maintenance Window defines an authorized operational window for executing disruptive actions (patch installation, rebooting) across instances:
- Schedule: Defined via a CRON or Rate expression (e.g.,
cron(0 2 ? * SUN *)for Sundays at 02:00 UTC). - Duration & Cutoff: Specifies total window runtime (e.g., 4 hours) and a Cutoff (e.g., 1 hour before window close). Patch Manager will not initiate new tasks once the cutoff is reached, ensuring tasks do not bleed into business operating hours.
- Registered Targets: Specifies target instances by Resource Tags (e.g.,
Environment=Production), Resource Groups, or explicit Node IDs. - Registered Tasks: Executes the SSM document
AWS-RunPatchBaselinewith parameters:Operation: Scan: Evaluates patch compliance without modifying installed packages, emitting compliance telemetry to Systems Manager Compliance.Operation: Install: Downloads approved missing patches, applies updates, and reboots the instance if required (RebootOption: RebootIfNeededorNoReboot).
Shift-Left Code Security: Inspector Code Security, CodeGuru Security & Amazon Q Developer
While Inspector and Patch Manager secure deployed runtime infrastructure, resolving vulnerabilities in production is orders of magnitude more expensive than preventing them during development. Modern AWS security architectures "shift left" by embedding static application security testing (SAST) directly into developer IDEs and continuous integration/continuous delivery (CI/CD) pipelines.
From CodeGuru Security to Amazon Inspector Code Security
The exam guide names Amazon CodeGuru Security, a static application security testing (SAST) service for source code. AWS discontinued CodeGuru Security on November 20, 2025. Its role now belongs to Amazon Inspector code security (generally available since June 2025), which connects to GitHub or GitLab repositories and runs SAST, software composition analysis of dependencies, and infrastructure-as-code scans. The capabilities to know are the same:
- Pipeline Integration: Scans on push, on pull or merge requests, and on a schedule for connected repositories, so findings appear before code merges.
- Vulnerability Coverage: Detects the OWASP Top 10 web application risks, including SQL injection, Command Injection, Cross-Site Scripting (XSS), Path Traversal, and Server-Side Request Forgery (SSRF).
- Credential Leakage Prevention: Identifies plaintext AWS access keys, database connection strings, API tokens, and private cryptographic keys embedded in source code.
- Remediation Guidance: Findings include recommended fixes that developers can apply before merging.
Amazon Q Developer (Security Scanning)
Amazon Q Developer extends security analysis into the software engineer's IDE (Visual Studio Code, JetBrains IntelliJ) and the AWS Management Console:
- Inline Code Review: Analyzes code in real time as developers write, flagging insecure library dependencies, vulnerable API calls, and logic flaws prior to repository commit.
- Autonomous Code Transformation: Automatically upgrades legacy application runtimes (e.g., upgrading Java 8/11 applications to Java 17/21) while refactoring deprecated security APIs and unpatched framework dependencies.
Specialty Exam Pitfalls & Operational Traps
- The Inspector Agentless Scanning Misconception: Candidates often assume Inspector v2 requires the SSM Agent under all circumstances. While the SSM Agent provides deeper, near-instantaneous package telemetry, Inspector v2 supports Agentless Scanning for EC2 via EBS snapshot copies. An unmanaged instance without an SSM agent is still scanned if agentless mode is enabled.
- Patch Baseline Auto-Approval Delay Pitfall: In regulated environments, approving patches with an auto-approval delay of
0 dayscan cause widespread outages if a vendor releases a flawed patch. Standard exam-tested practice mandates configuring an auto-approval delay (typically 5 to 10 days) to allow upstream vendor validation, combined with an explicit approved patch list for emergency zero-day hotfixes. - Patch Group Tag Naming Requirements: The tag key must be exactly
Patch GrouporPatchGroup(case-sensitive). Variants such aspatch-grouporPatch-Groupdo not match, so the instance falls back to the default patch baseline for its operating system. - Lambda Standard vs Lambda Code Scanning: Standard Lambda scanning inspects third-party package dependencies bundled in the deployment zip or imported via Lambda Layers. However, standard scanning does not inspect custom developer-written application logic. To detect SQL injection, hardcoded secrets, or insecure input handling inside the Lambda function handler itself, you must enable Amazon Inspector Lambda Code Scanning.
A security operations team reviews two Amazon Inspector findings on production EC2 instances. Finding 1 represents a remote code execution vulnerability with a base CVSS score of 9.8 located on an EC2 instance in a private subnet with no internet gateway or public IP. Finding 2 represents a vulnerability with a base CVSS score of 6.5 located on an internet-facing EC2 instance in a public subnet with an open security group port, and the vulnerability is actively listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. How does Amazon Inspector score these findings, and how should the team prioritize remediation?
Inspector calculates an identical risk score for both findings based strictly on NVD data, and the team should remediate Finding 1 first because its CVSS score is 9.8.
Inspector lowers Finding 1's Inspector score because no network path exists to exploit it, while Finding 2 keeps an elevated score and is flagged as known-exploited on a reachable instance; the team should prioritize Finding 2.
Inspector automatically suppresses Finding 2 because medium-severity findings do not warrant alerts, requiring the team to address only Finding 1.
Inspector adjusts scores based only on CPU utilization, scoring Finding 1 higher because remote code execution generates higher compute overhead.
An enterprise requires an automated patching strategy for a fleet of 500 Amazon EC2 instances distributed across production and non-production environments. The security policy mandates that: (1) newly released operating system security patches must undergo a 7-day soak period before being installed, (2) production instances must only be patched on Saturdays between 01:00 and 05:00 UTC, and (3) non-compliant instances must be auditable in a central dashboard. Which solution implements this with the lowest operational overhead?
Deploy an AWS Lambda function running on an hourly EventBridge schedule that executes yum update -y across all instances using SSH commands stored in AWS Secrets Manager.
Install an open-source cron daemon on each instance configured to run apt-get upgrade every Saturday morning, pushing logs to Amazon S3.
Create an Amazon EC2 Auto Scaling lifecycle hook that terminates and replaces all instances every 7 days using the newest default AMI.
Configure a custom Systems Manager Patch Baseline with an auto-approval delay of 7 days, tag production instances with the 'Patch Group' tag matching the baseline, and register a Systems Manager Maintenance Window executing the AWS-RunPatchBaseline task every Saturday at 01:00 UTC.
A healthcare provider runs proprietary microservices on AWS Lambda. The application handler code accepts user input from an external portal, parses patient records, and invokes internal microservices. The security compliance officer mandates continuous automated vulnerability scanning of both the third-party Python libraries imported by the functions and the custom Python handler code itself to detect flaws such as SQL injection and hardcoded credentials. How should the security engineer configure Amazon Inspector?
Enable Amazon Inspector for AWS Lambda, ensuring that both Lambda Standard Scanning (for package dependencies) and Lambda Code Scanning (for custom code analysis) are activated.
Enable Amazon Inspector Classic and install the standalone Inspector agent inside the Lambda deployment zip archive.
Configure Amazon GuardDuty Runtime Monitoring on AWS Lambda to execute static analysis during function invocation.
Deploy an AWS WAF rule that parses the Lambda deployment package in S3 before the function is published.
A software development organization wants to prevent security vulnerabilities, vulnerable dependencies, and hardcoded AWS credentials from entering production. The security team mandates that source code in the company's GitHub repositories be scanned automatically on every pull request, before any container image or artifact is built. Which AWS capability should be used?
AWS Systems Manager Session Manager
Amazon CloudWatch Synthetics
Amazon Inspector code security, which replaced the discontinued Amazon CodeGuru Security
AWS Shield Advanced
Sections you finish are checked off in the contents.