Update a sg to add port from existing sg using boto.authorize -


I am trying to update a security group to add a port to another security group. Ex: sg

But I do find the following error

  sg.authorize ( 'sg- 123456) abcdef', 'TCP' 22, 22, "SG 123456 ') file" /usr/local/lib/python2.7/site-packages/boto/ec2/securitygroup.py ", line 187, authorized src_group_owner_id = Src_group.owner_id enter attribute:' str 'Object' does not contain any attribute 'owner id'  

If you have authorized The method is the use of the security group object that you represent the source security group on other sur Rsha Group object. You see the security group's ID passing through the string.

You authorize_security_group method EC2Conction can also use the object that's why accept a string value for the source protection group: < / p>

  ec2.authorize_security_group (group_id = 'SG abcdef', ip_protocol = 'tcp', from_port = 22, to_port = 22, src_security_group_group_id = 'SG -123456', src_security_group_owner_id = '123456789012')    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -