0

I have been trying to add access rules to a security group "test". Below is the code that i have been using:

web = conn.create_security_group('test', 'couch_db')
web.authorize('tcp', 1, 65535, '0.0.0.0/0')
web.authorize('tcp', 5984, 5984, '0.0.0.0/0')

When I run the above commands, a new security group named "test" gets created, with two specified INGRESS rules. However, i want my second rule (with port :5984) to be of EGRESS type or EGRESS directed. Could anyone please help me with this issue. Thank you.

Th3Dark0
  • 132
  • 1
  • 2
  • 10

1 Answers1

0

I believe this should work for you:

web.authorize_security_group_egress('test', 'tcp', from_port=5984, to_port=5984, cidr_ip='0.0.0.0/0')
nir0s
  • 1,151
  • 7
  • 17