Sign out and log in again with an IAM user with admin rights.
Go to IAM service administration interface



{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:*",
"Resource": "*",
"Condition": {
"ForAllValues:StringLike": {
"ec2:InstanceType": [
"t3.nano"
]
}
}
}
]
}

In this step, we have specified that we can only create instances with family and size as t3.nano. In the next step, we will test the effectiveness of this policy.