Skip to content

Instantly share code, notes, and snippets.

@jlintz
Created September 29, 2015 15:26
Show Gist options
  • Save jlintz/45d65e0d1f4b29b6b4c6 to your computer and use it in GitHub Desktop.
Save jlintz/45d65e0d1f4b29b6b4c6 to your computer and use it in GitHub Desktop.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyStopAndTerminateWhenMFAIsFalse",
"Effect": "Deny",
"Action": [
"ec2:StopInstances",
"ec2:TerminateInstances"
],
"Resource": "*",
"Condition": {
"Bool": {
"aws:MultiFactorAuthPresent": false
}
}
},
{
"Sid": "DenyStopAndTerminateWhenMFAIsNotPresent",
"Effect": "Deny",
"Action": [
"ec2:StopInstances",
"ec2:TerminateInstances"
],
"Resource": "*",
"Condition": {
"Null": {
"aws:MultiFactorAuthPresent": true
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment