How to describe EC2 instances using Boto3

0 votes

Hi Guys,

I am new to the boto3 module. I want to describe the instances available in the AWS account using boto3. How can I do that?

Oct 8, 2020 in AWS by akhtar
• 38,210 points

1 answer to this question.

0 votes


An EC2 instance is a virtual server in Amazon's Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure. You can describe one or more EC2 instances as shown below.

import boto3
ec2 = boto3.client('ec2')
response = ec2.describe_instances()
answered Oct 8, 2020 by MD
• 95,300 points

Related Questions In AWS

0 votes
1 answer

How to Pass the VPC ID while creating the Ec2 instance in AWS using Python Boto3

import boto3 ec2 = boto3.resource('ec2') instance = ec2.create_instances( ...READ MORE

answered Jan 29, 2019 in AWS by Priyaj
• 58,140 points
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer

How can I return XML from boto calls?

I don't think there's an officially supported ...READ MORE

answered Jul 20, 2018 in AWS by Cloud gunner
• 4,650 points
0 votes
1 answer

How to stop EC2 instances using Boto3?

Hi@akhtar, To change the state of an EC2 ...READ MORE

answered Oct 7, 2020 in AWS by MD
• 95,300 points