Using Console
Using CLI
<security-group-id>
with the security group ID identified in the previous step.
<security-group-id>
with the security group ID, <port-number>
with the specific port number, and <ip-range>
with the IP address range you want to allow access from.
<security-group-id>
with the security group ID.
Using Python
authorize_security_group_ingress
and authorize_security_group_egress
methods of the boto3
ec2
client.