数据库安全组只能使用API版本VPC数据库实例相关联 [英] DB Security Groups can only be associated with VPC DB Instances using API versions
问题描述
我有这个code以下,以创建AWS一个RDS实例:
进口boto.rds
REGION =美东1
INSTANCE_TYPE =db.t1.micro
ID =的MySQL数据库实例,数据库测试2
USERNAME =根
PASSWORD =通行证
DB_PORT = 3306
DB_SIZE = 5
DB_ENGINE =MySQL5.1
DB_NAME =databasetest2
SECGROUP_HANDLE =默认
打印连接到RDS
康恩= boto.rds.connect_to_region(地区)
打印创建RDS实例
例如= conn.create_dbinstance(ID,DB_SIZE,INSTANCE_TYPE,用户名,密码,端口= DB_PORT,发动机= DB_ENGINE,DB_NAME = DB_NAME,security_groups = [SECGROUP_HANDLE])
打印实例
但我一直有这个错误涉及到安全组:
数据库安全组只能使用API版本2012-01-15至2012年9月17日VPC数据库实例相关联。
任何人都可以请帮助解决这个问题?
如果我用security_groups林具有vpc_security_groups代替:
<消息>无效安全组的groupId = F,U,D,T,E,A,L,组名=< /消息>
博托从版本1迁移RDSConnection到第2版,您可以检查的这个 -
早些时候,我们可以把所有的db_instances使用 get_all_dbinstances()
但是现在我们只能取使用 describe_db_instances()
。
尝试使用 vpc_security_group()
。
支持RDS的新版本的官方文档,即RDS2是这里。
I have this code below to create a RDS instance in aws:
import boto.rds
REGION="us-east-1"
INSTANCE_TYPE="db.t1.micro"
ID = "MySQL-db-instance-database-test2"
USERNAME="root"
PASSWORD = "pass"
DB_PORT = 3306
DB_SIZE = 5
DB_ENGINE = "MySQL5.1"
DB_NAME = "databasetest2"
SECGROUP_HANDLE="default"
print "Connecting to RDS"
conn = boto.rds.connect_to_region(REGION)
print "Creating a RDS Instance"
instance = conn.create_dbinstance(ID, DB_SIZE, INSTANCE_TYPE, USERNAME, PASSWORD, port=DB_PORT, engine=DB_ENGINE,db_name=DB_NAME, security_groups = [SECGROUP_HANDLE],)
print instance
But I am having always this error related to security groups:
DB Security Groups can only be associated with VPC DB Instances using API versions 2012-01-15 through 2012-09-17.
Can anyone please help solve this issue?
If I use vpc_security_groups instead of security_groups Im having:
<Message>Invalid security group , groupId= f, u, d, t, e, a, l, groupName=.</Message>
Boto is migrating RDSConnection from version 1 to version 2. You can check this -
Earlier we could have got all the db_instances using get_all_dbinstances()
but now we can only fetch using describe_db_instances()
.
Try using vpc_security_group()
.
The official doc for new version of RDS, i.e. RDS2 is here.
这篇关于数据库安全组只能使用API版本VPC数据库实例相关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!