Skip to content

Instantly share code, notes, and snippets.

@koheyamada
Last active October 19, 2018 08:09
Show Gist options
  • Save koheyamada/90c81f3e3380b8cc5220318eb5eedff8 to your computer and use it in GitHub Desktop.
Save koheyamada/90c81f3e3380b8cc5220318eb5eedff8 to your computer and use it in GitHub Desktop.
スイッチロールユーザーに対して期間限定&MFA利用でのアクセスを許可する。 ref: https://qiita.com/kooohei/items/dc214263ca4af90f9991
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": [
"*"
],
"Resource": "*",
"Condition": {
"DateGreaterThan": {"aws:CurrentTime": "2018-10-01T00:00:00Z"},
"DateLessThan": {"aws:CurrentTime": "2018-12-31T23:59:59Z"}
}
}
}
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": [
"*"
],
"Resource": "*",
"Condition": {
"Bool": {"aws:MultiFactorAuthPresent": true},
"DateGreaterThan": {"aws:CurrentTime": "2018-10-01T00:00:00Z"},
"DateLessThan": {"aws:CurrentTime": "2018-12-31T23:59:59Z"}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment