How to describe a key pair using Boto3

0 votes

Hi Guys,

I have created an AWS account. I want to use AWS services for automation purposes. In my use case, I am using the Boto3 module. Can anyone tell me how can I describe the key pair using Boto3?

Oct 8, 2020 in AWS by akhtar
• 38,230 points
1,265 views

1 answer to this question.

0 votes

Hi@akhtar,

You can find one method in your boto3 module named describe_key_pairs. This method can be used to describe the key pairs.

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

Related Questions In AWS

0 votes
3 answers
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer

How to delete a key pair using Boto3?

Hi@akhtar, You can delete a key pair using ...READ MORE

answered Oct 8, 2020 in AWS by MD
• 95,440 points
1,576 views
0 votes
1 answer

How to download a file from S3 buckets using boto3?

Hi@akhtar, Boto3 supports upload_file() and download_file() APIs to ...READ MORE

answered Oct 8, 2020 in AWS by MD
• 95,440 points
7,894 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP