vendredi 2 octobre 2015

How could I add current pc IP into security group with aws cli

I want to add current working PC's IP into security group,

And enable all traffice for it. Every time I should do that manually with the web dashboard.

How could I do it with shell script.

The following are the mose common aws cli commands I used.

But I couldn't find how to add ip in a specific security group.

list_instances(){
    aws ec2 describe-instances --query 'Reservations[].Instances[].[Tags[?Key==`Name`].Value,InstanceId,PublicIpAddress,PrivateIpAddress]' --output text
}
start_instance(){
    aws ec2 start-instances --instance-ids $1
}




Aucun commentaire:

Enregistrer un commentaire