Created
August 28, 2020 08:44
-
-
Save klein-mask/8d4e44916d831f8f9db00a756d211870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "1", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": [ | |
"elasticfilesystem:ClientRootAccess", | |
"elasticfilesystem:ClientMount", | |
"elasticfilesystem:ClientWrite" | |
], | |
"Resource": "EFSのARN", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": "許可したいEC2のIP" | |
} | |
} | |
}, | |
{ | |
"Sid": "2", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": [ | |
"elasticfilesystem:ClientRootAccess", | |
"elasticfilesystem:ClientMount" | |
], | |
"Resource": "EFSのARN", | |
"Condition": { | |
"NotIpAddress": { | |
"aws:SourceIp": "許可したいEC2のIP" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment