I'm experiencing a strange issue regarding IAM policy! I want to limit RDS access to specific IAM roles for different environments, the policy works fine until I add conditions!!
"Statement": [
{
"Action": "rds:*",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"rds:db-tag/Environment": "dev"
}
},
"Resource": "*",
"Sid": "RdsAccess"
}
],
"Version": "2012-10-17"
}
However, when I remove the condition, the policy works just fine. You can see AWS services' conditions keys from the official AWS documentation here: https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrds.html