将 RDS 用户限制在特定区域

将 RDS 用户限制在特定区域

我正在尝试创建一个策略,以限制用户访问不同区域的 RDS。但是我想只授予他们一个区域(即 ap-southeast-1)的管理员访问权限。

我制定了一些政策,但它们不适用于新加坡地区,只适用于美国东部地区。

为什么这对美国东部有效,但对新加坡却无效?

政策示例:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt----------",
            "Effect": "Allow",
            "Action": [
                "rds:*"
            ],
            "Condition": {
                "StringEquals": {
                    "ec2:Region": "ap-southeast-1"
                }
            },
            "Resource": [
                "*"
            ]
        }
    ]
} 

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt----------",
            "Action": [
                "rds:*",
                "cloudwatch:DescribeAlarms",
                "cloudwatch:GetMetricStatistics",
                "ec2:DescribeAccountAttributes",
                "ec2:DescribeAvailabilityZones",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeSubnets",
                "ec2:DescribeVpcs",
                "sns:ListSubscriptions",
                "sns:ListTopics",
                "logs:DescribeLogStreams",
                "logs:GetLogEvents"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:rds:ap-southeast-1:*"
        }
    ]
}

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1454649600000",
            "Effect": "Allow",
            "Action": [
                "*"
            ],
            "Resource": [
                "arn:aws:rds:ap-southeast-1:account number:*"
            ]
        }
    ]
}

相关内容