我正嘗試使用boto ec2連接對象創建安全組。安全組已成功創建,但它在ec2中創建,但我希望在VPC中創建它。下面是代碼片段使用boto ec2連接對象在VPC中創建安全組
import boto
import boto.ec2
from sys import argv
connection = boto.ec2.connect_to_region('us-east-1')
create = connection.create_security_group('test', 'Testing')
你應該罰款與'boto.ec2'直接創建:'連接= boto.ec2.connect_to_region( '美東-1'); create = connection.create_security_group('testing1','testing1',vpc_id ='vpc-1234abc56')',不需要模塊'boto.vpc'。 – BMW 2015-07-03 07:43:53