{{ }} Substitute variables
Adjust the variable values according to your preference.
Policy Code
Referenced from: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_ec2.html
1{
2 "Version": "2012-10-17",
3 "Statement": [
4 {
5 "Effect": "Deny",
6 "Action": "ec2:RunInstances",
7 "Resource": [
8 "arn:aws:ec2:*:*:instance/*"
9 ],
10 "Condition": {
11 "StringNotEquals": {
12 "ec2:InstanceType": "{{instance-type}}"
13 }
14 }
15 }
16 ]
17}
DOC
Replace {{instance-type}} with the type of instance you wish to require (i.e. t2.micro)