How To Scanning Amazon EC2 Instances With Amazon Inspector
Last Updated :
19 Mar, 2024
Amazon Inspector is a vulnerability management service that continuously scans your running Amazon EC2 instances, container images in Amazon Elastic Container Registry (Amazon ECR), and AWS Lambda functions.
Now here we see how to scan Amazon ec2 instances with Amazon Inspector.
Amazon Inspector EC2 scanning extracts metadata from your EC2 instance and compares it with rules collected from security advisories to produce findings. Amazon Inspector scans instances for package vulnerabilities and network reachability issues.
Types Of Scan Methods
Package vulnerability scans can be performed using a two-scan method.
Agent-based scanning:
Agent-based scans are performed continuously using the SSM agent on all eligible instances. For agent-based scans, Amazon Inspector uses SSM associations, and plugins installed through these associations, to collect software inventory from your instances.
Agentless scanning
Agentless scans are performed using EBS snapshots to collect a software inventory from instances. Instances scanned for both operating system package, and application programming language package vulnerabilities.
Now here we scan EC2 instances with an agent-based scanning method.
Steps to scan EC2 instances in Amazon Inspector:
Step 1: Launch the EC2 instance of Linux and set all inbound rules like SSH, HTTP, HTTPS, etc.

Step 2: In inspector we inspect all of account by admin access account to delegate it and also inspect our account at a time. So here we inspect login account only.
Go to Amazon Inspector and click on Activate Inspector.

And then you see Amazen inspector dashboard. Here you see Environment coverage, Critical findings, Risk based remediations and most Critical findings of all EC2, ECR and Lambda function and etc.Now click on instances â0%â.

Here you see in details of header âStatusâ ââUnmanaged EC2 instancesâ.

Now click on âAll findingâ and you see there see you see finding about your instances like open port and etc.

Step 3: Now scan EC2 instances continually set a IAM Roles for SSM agent.Go to IAM and click on Roles -> create role.

Select EC2 in use case. Click on next
Step 3.1: select âAmazonSSMManagedInstanceCoreâ policy and click on next.

Step 3.2: write role name and description of role and click on âcreate roleâ.

Now configure this role to EC2 instances.
Step 4: go to EC2 instances click on your instances -> Action -> Security -> Modify IAM role

Step 4.1: choose your create role and click on Update IAM role.
Now it take half an hour and then it see again Inspector now in Environment coverage âinstancesâ is update and then click on it and see the âStutasâ header it update to âActively monitoringâ.


And now it actively scan all package vulnerabilities and for network reachability of your EC2 instances.
Conclusion
So, here we actively scan all package vulnerabilities and for network reachability of our EC2 instances by amazon inspector and monitoring our EC2 instances. Amazon Inspector offers a robust and automated solution for scanning your EC2 instances for vulnerabilities and security misconfigurations.
Scanning Amazon EC2 Instances With Amazon Inspector - FAQ's
Does Inspector scan stopped instances?
No, Inspector pauses scanning for stopped instances.Inspector will not actively search for vulnerabilities on the stopped instance.
What happens when an instance is stopped?
The virtual machine (VM) running the instance is shut down. This means the instance is no longer operational and unavailable for use.
How frequent is vulnerability scanning?
Network Reachability Scans (EC2 Instances): These scans happen every 24 hours for EC2 instances
Are you looking to become an AWS Expert? Enroll in our AWS Solutions Architect Certification Training Program on GeeksforGeeks and take advantage of our Three 90 Challenge: Get a whooping 90% refund on course completion within 90 Days. Perfect for students and working professionals, this live course covers everything from foundational concepts to advanced AWS services, preparing you for the certification exam. With real-time training and hands-on projects, you'll gain the skills to design and deploy scalable applications on AWS.
Similar Reads
How To Scanning Amazon EC2 Instances With Amazon Inspector
Amazon Inspector is a vulnerability management service that continuously scans your running Amazon EC2 instances, container images in Amazon Elastic Container Registry (Amazon ECR), and AWS Lambda functions. Now here we see how to scan Amazon ec2 instances with Amazon Inspector. Amazon Inspector EC2
3 min read
Amazon Web Services - Introduction to Amazon CloudWatch Synthetics
In this article, we will get an introduction to Amazon Cloudwatch Synthetics. With this feature, you can create different kinds of Canaries to continually verify your user experience even when you don't have traffic, monitor and test for unusual behavior, and trace issues to their source for faster
3 min read
How To Get An AWS EC2 Instance ID From Within That EC2 Instance?
Amazon EC2 is an important service of AWS that provides users a scalable and virtual computing resources in the cloud. Each EC2 instance is assigned a unique identifier called Instance ID. Instance ID is an alphanumeric code(which means a combination of alphabets and numbers) that is used for variou
4 min read
Amazon Web Services - Introduction to Amazon EKS
Amazon Elastic Kubernetes Service(EKS) is a fully managed service that you can use to run Kubernetes on Amazon Web Service. Kubernetes is open-source software that enables you to install and manage applications at a high scale. Table of Content What is Amazon EKSBenefits of Amazon EKSHow Amazon EKS
11 min read
How To Set The Time Zone In Amazon EC2 ?
Amazon Elastic Compute Cloud (EC2) is a widely used cloud computing service that provides scalable computing capacity in the cloud. While deploying applications on EC2 instances, it is crucial to ensure that the system time is correctly set according to the desired time zone. This article will guide
3 min read
How to Connect to Amazon Linux Instance Using SSH?
Pre-requisites: AWS, SSH TOOLS AWS stands for Amazon Web Services, and it is a cloud computing platform provided by Amazon. AWS provides a range of cloud-based services, including computing power, storage, databases, analytics, machine learning, and many other resources that businesses and individua
3 min read
How To Setup Amazon Web Service (AWS) ECS?
Amazon ECS is a popular Cloud Computing service that is used for more efficient cloud-based container management. Amazon ECS makes it easier to build apps without being limited by physical hardware resources. In this article, we will guide you through setting up and running the ECS service and show
7 min read
Amazon RDS - Monitoring an Amazon RDS Database Instance
This article intends to educate you about "Monitoring an Amazon RDS Database Instance". Monitoring is essential for your database instance because it is directly proportional to the maintenance of your RDS database instance. If we keep monitoring all the resources then it will be easy for us to debu
6 min read
Run commands on your EC2 instance at launch with user data input
It is important sometimes when we launch a new instance in the cloud interface or environments such as in the AWS EC2 instance that we run specific commands to install a particular software or configure the system so that the system can be used. This capability simplifies automation, ensuring that e
6 min read
How To See All Running Amazon EC2 Instances Across All Regions At Once?
EC2, or Elastic Compute Cloud, is a core service provided by Amazon Web Services (AWS) that is used to create virtual servers on the AWS cloud platform. The one that we create using the EC2 service is called an EC2 instance. We can use this EC2 instance to deploy and run a wide variety of applicatio
4 min read
Amazon RDS - Modifying An Amazon RDS DB Instance
Amazon RDS (Relational Database Service) is a powerful cloud-based database solution provided by AWS. On using this RDS database users may focus more on their applications because of its less complexity with its database setup. AWS manages the administration setup complexities and provides simple ha
6 min read
Amazon VPC - Launching an EC2 Instance into a VPC
This article will cover all the aspects of Launching an EC2 Instance into a VPC. As we are already aware of the basic process of launching an EC2 instance on AWS, launching it into VPC is almost the same. Every EC2 instance launched on AWS is by default launched inside the default VPC of that partic
3 min read
Creating an EC2 Instance with AWS CLI: A Simple Tutorial
Amazon EC2 (Elastic Compute Cloud) is a core service in AWS that allows users to launch and manage virtual machines in the cloud. While the AWS Management Console is commonly used to create and manage EC2 instances, the AWS Command Line Interface (CLI) offers a powerful way to automate the process,
8 min read
How To Increase The Storage Of EC2 Instance ?
EC2 or Elastic Compute Cloud is a core service provided by Amazon web services (AWS) which is used to create virtual servers on the AWS cloud platform the one that we create using the EC2 service is called an EC2 instance. we can use this ec2 instance to deploy and run a wide variety of applications
3 min read
How to Install an SSL/TLS Certificate In Amazon EC2 (AWS)
AWS EC2 is one of the most used and convenient solutions for hosting web servers and applications accessible worldwide. Securing your applications with an SSL certificate is vital for safeguarding user data and building trust. In this article, we will be hosting a basic web application on EC2 and wi
6 min read
How To Integrate AWS Auto Scaling With Classical Load Balancer ?
Auto Scaling is a service in Amazon Web Services (AWS) with the help of an EC2 instance that automatically changes the number of instances as per the user's application demand. this nature of auto-scaling helps to achieve high availability for an application without any high cost. The elasticity fea
5 min read
Securing EC2 Instances With Security Groups And Key Pairs
Amazon provides a service for website hosting and maintenance that is EC2, Elastic Cloud instance. They are the backbone of cloud-based applications, providing scalability and flexibility in computing resources. However, there are many challenges in protecting these instances from threats and attack
6 min read
Amazon Web Services - Upload Data to Amazon FinSpace
In this article, we will look into how you can upload data to Amazon FinSpace. Adding data to FinSpace is easy so long as you are a member of the group with the Create datasets permission. To do so follow the below steps: Step 1: From the home page choose ADD DATA. Step 2: Files can be simply droppe
2 min read
Amazon RDS - Upgrading a DB Instance Engine Version
This article aims to make you aware "Upgrading a DB Instance Engine Version". Upgrading a DB instance Engine comes under the maintenance section of the database instance. AWS has an in-built feature, that sends notifications regarding all kinds of updates in a DB instance. Under all this, there are
2 min read
How To Create Spot Instance In Aws-Ec2 In Aws Latest Wizards?
Spot instances are available at up to 90% discount because when instances are not used then the instance available in spot instance at a cheaper rate so that people can utilize. it. When the demand increases then amazon sent a notification your spot instance will disappear after two minutes. We can
6 min read