【发布时间】:2020-03-27 22:09:42
【问题描述】:
我描述的场景与此处Unable to add Ec2 VPC Security group in Non VPC RDS MySQL Security group? 或此处Adding Spot Instances to the Security Group of an RDS Instance 所描述的不同: 我在 ec2 vpc 中有很多点,我想让您访问 ec2 经典中的 rds 数据库。就像第二个链接一样,我的景点不时更新,我必须能够将草坪机器的 ip 添加到 rds 实例的安全组中。
可以从控制台进行配置并且工作正常,只需转到您的 rds 实例的安全组并添加一个带有 CIDR/IP 的规则。
但是通过 cli 使用以下命令执行此操作:
aws rds authorize-db-security-group-ingress --db-security-group-name default --cidrip xxx.xx.x.xxx/32
我收到此错误:
HTTPSConnectionPool(host='ec2.eu-west-1c.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<botocore.awsrequest.AWSHTTPSConnection object at 0x__________>: Failed to establish a new connection: Errno -2] Name or service not known',))
详情
我创建了一个具有以下权限边界的 IAM 用户:AuthorizeDBSecurityGroupIngress
spot vpc 和 rds ec2 经典实例都在同一个 eu-west-1c 可用区。
在命令的文档中不要特别指定你不能做https://docs.aws.amazon.com/cli/latest/reference/rds/authorize-db-security-group-ingress.html。同样奇怪的是,它可以从控制台而不是从 cli 完成。
我不知道我错过了什么,有什么想法吗?
【问题讨论】:
标签: amazon-web-services amazon-ec2 amazon-rds aws-cli