Is it possible to write this more succinctly I have tried a number of ways but all seem to fail. I have Tried adding all 3 conditions to one deny with ForAllValues or ForAnyValues but although the statements create the rules are not enforced entirely unless it is written like this.
{"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Deny",
"Action": [
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"Null": {
"aws:RequestTag/Name": "true"
}
}
},
{
"Sid": "Statement2",
"Effect": "Deny",
"Action": [
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"Null": {
"aws:RequestTag/Dept": "true"
}
}
},
{
"Sid": "Statement3",
"Effect": "Deny",
"Action": [
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"Null": {
"aws:RequestTag/Owner": "true"
}
}
}
]
}