You must be logged in to view saved presets
An IAM policy that prevents users from terminating EC2 instances when the request does not come from a specified IP range. This policy provides the permissions necessary to complete this action using the AWS API or AWS CLI only.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ec2:TerminateInstances"
],
"Resource": [
"*"
],
"Effect": "Allow",
"Condition": {}
},
{
"Action": [
"ec2:TerminateInstances"
],
"Resource": "*",
"Effect": "Deny",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
""
]
}
}
}
]
}