1

I am trying to create a policy where I can restrict users to access different region RDS. However I want to give them admin access to only one region i.e. ap-southeast-1.

I have created some policies but they're not working for the Singapore region, only the us-east region.

Why is this working us-east but not for Singapore?

Policy Examples:

{
    "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:*"
            ]
        }
    ]
}
4

1 回答 1

0

试试这个..下面的代码对我有用。

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt145591112222",
      "Action": "rds:*",
      "Effect": "Allow",
      "Resource": "arn:aws:rds:ap-southeast-1:ACC_ID:db:*"

    }
  ]
}
于 2016-02-19T22:00:49.430 回答