Scanning Workloads for Vulnerabilities with Amazon Inspector
This lesson explains how Amazon Inspector continuously scans workloads for software vulnerabilities and unintended network exposure, and prioritises the findings by risk.
Learning outcomes
After completing this lesson, you will be able to:
- Identify what Inspector scans.
- Interpret Inspector findings.
- Describe organisation-wide Inspector coverage.
What Inspector scans
Amazon Inspector finds known software vulnerabilities and unintended network exposure. For EC2 instances, it inventories installed packages through the SSM Agent, or agentlessly from EBS snapshots, and checks which ports are reachable from the internet. For container images in ECR, it scans each image when it is pushed and keeps re-evaluating stored images as new vulnerabilities, identified by CVE numbers, are published.
For Lambda functions, it scans the packages a function depends on and, optionally, the function's own code for problems such as injection flaws and hard-coded secrets. Inspector can also scan images inside CI/CD pipelines, so vulnerable images are caught before they are pushed. Each finding has a risk score that reflects whether an exploit exists and whether the resource is reachable. The following table summarises the resources scanned.
| Resource | Scanning |
|---|---|
| EC2 instances | Packages and network reachability, through the SSM Agent or agentless EBS snapshot scanning |
| Container images in ECR | On push and continuously as new CVEs are published |
| Lambda functions | Package dependencies, and optionally the function code itself |
| CI/CD pipelines | Images scanned before they are pushed |
Findings
Each vulnerability that Amazon Inspector detects becomes a finding that names the CVE (Common Vulnerabilities and Exposures) identifier, the affected package and the version that fixes it. Each finding has an Inspector risk score, which adjusts the general CVSS severity score for the resource's actual situation, such as whether it is reachable from the internet and whether an exploit is available, so teams can fix the most dangerous issues first.
Findings flow to AWS Security Hub and Amazon EventBridge, so patching can be automated, for example with AWS Systems Manager Patch Manager. A software bill of materials (SBOM), listing every package in a resource, can be exported for each resource.
Inspector findings
Coverage
Like GuardDuty, Inspector is enabled organisation-wide from a delegated administrator, and new resources are scanned automatically. It assesses known vulnerabilities; it does not detect active attacks, which is GuardDuty's role.
Finding and fixing vulnerable software
A critical vulnerability is announced in a widely used library. The company must know within hours which instances, container images and Lambda functions are affected.
| Resource | How Inspector finds it |
|---|---|
| EC2 instances | Continuous package scanning through the SSM Agent, or agentless snapshot scans |
| Images in ECR | Rescanned automatically when new CVEs are published |
| Lambda functions | Dependency scanning of each function |
Findings are prioritised by the Inspector risk score, which accounts for network reachability. High-severity EC2 findings trigger Systems Manager Patch Manager through EventBridge, and images are rebuilt by the pipeline.
What does Amazon Inspector scan for?
Show answer
Software vulnerabilities and unintended network exposure in EC2 instances, container images in ECR and Lambda functions, continuously as new vulnerabilities are published.
Exam Tips
Remember for the exam
- To find software vulnerabilities in EC2, ECR images and Lambda, use Inspector.
- To scan container images automatically when they are pushed to ECR, enable Inspector enhanced scanning.
- Inspector finds vulnerabilities; GuardDuty finds active threats.
- To patch vulnerable instances automatically, route Inspector findings to Systems Manager.