Skip to main content

All Questions

1 vote
1 answer
2k views

Removing security group from ec2 instance using aws cli or python

As there is already a way to remove (not deleting) the security group from an ec2 instance from aws console, i am looking for a way to do it programatically by using python or aws cli. but not able to ...
jayendra bhatt's user avatar
0 votes
2 answers
645 views

Check Security Group existence in Python?

I use aws-cli v1 and I want to check the SG existence is certain VPC. I use the command describe-security-groups which seems to be the only available for this task: aws ec2 describe-security-groups --...
Suncatcher's user avatar
  • 10.7k
-1 votes
1 answer
120 views

Converting unicode to string with " "

I'm currently working on a script for deleting aws resources using aws cli and python. As a part of my script, I have to delete the rules of a security group. The approach that I have taken is I ...
Arya Shah's user avatar
0 votes
1 answer
368 views

aws python boto3 is not returning the right number of security groups

I am using Python SDK boto3 in order to get all the security groups into the region but I am getting the wrong number. there is my code: ## Client connection ec2 = boto3.client( 'ec2', ...
Robert's user avatar
  • 11k