Whitelist an IP in Amazon AWS security group from command line
To white list an IP in Amazon AWS security group using aws command line tool, run
1 |
aws ec2 authorize-security-group-ingress --group-id SECURITY_GROUP_ID_HERE --protocol tcp --port PORT_HERE --cidr IP_IN_CIDR_HERE |
Example
1 |
aws ec2 authorize-security-group-ingress --group-id sg-a777eee6 --protocol tcp --port 443 --cidr 94.31.33.128/27 |