Automated Vulnerability Scanning with Amazon Inspector - Continuous Security Assessment for EC2, Lambda, and ECR
Automatically scan EC2 instances, ECR container images, and Lambda functions for vulnerabilities and prioritize them with CVE-based risk scores. Learn how to achieve agentless scanning through Systems Manager integration.
Overview of Inspector
Amazon Inspector is a security assessment service that automatically scans EC2 instances, ECR container images, and Lambda functions for vulnerabilities. Inspector v2 was significantly redesigned from v1 - simply enabling it automatically discovers target resources and runs continuous scans. It cross-references the CVE (Common Vulnerabilities and Exposures) database and assigns a risk score (Inspector score) to each detected vulnerability. The Inspector score goes beyond the CVSS base score by incorporating network reachability and exploit availability into a contextual score, enabling prioritization based on actual risk. While GuardDuty specializes in runtime threat detection, Inspector focuses on proactive vulnerability discovery.
Scan Targets and Detection Methods
EC2 instance scanning runs through the Systems Manager (SSM) agent. Instances with the SSM agent installed are automatically included as scan targets, detecting OS package vulnerabilities (Amazon Linux, Ubuntu, Windows, etc.). Agentless scanning is also available, enabling EBS snapshot-based scanning without the SSM agent. ECR container image scanning runs on image push and through periodic rescans. It detects vulnerabilities in both base image OS packages and programming language packages (npm, pip, Maven, etc.). Lambda function scanning runs at deployment time and periodically, detecting vulnerabilities in packages that function code depends on.
Managing Findings and Integrations
Detected vulnerabilities are displayed in the Inspector console dashboard, showing risk scores, affected resources, and remediation guidance. Suppression rules let you hide accepted vulnerabilities or false positives so you can focus on findings that need attention. Integration with Security Hub lets you manage Inspector findings alongside findings from other security services (GuardDuty, Macie, Config) in a unified view. EventBridge integration lets you trigger SNS notifications or Lambda functions when Critical or High vulnerabilities are detected, enabling automated remediation workflows. Organizations integration lets a delegated administrator account centrally manage Inspector across all member accounts, providing visibility into the vulnerability posture of the entire organization. For hands-on guidance on security assessment practices, related books on Amazon are also helpful.
Inspector Pricing
Inspector pricing varies by scanned resource type. EC2 instance scanning costs approximately $1.2528 per instance per month. ECR container image initial scanning costs approximately $0.09 per image, and rescanning costs approximately $0.01 per image. Lambda function scanning costs approximately $0.30 per function per month. A free trial provides full access to all features for 15 days after activation. When enabling across all accounts with Organizations, estimate costs in advance based on account count multiplied by resource count.
Summary
Amazon Inspector is a security assessment service that automatically detects vulnerabilities in EC2, ECR, and Lambda and prioritizes them with context-based risk scores. It supports both SSM agent integration and agentless scanning, and automates the workflow from detection to remediation through Security Hub and EventBridge integration.