Skip to content

Instantly share code, notes, and snippets.

@klein-mask
Created August 28, 2020 08:44
Show Gist options
  • Save klein-mask/8d4e44916d831f8f9db00a756d211870 to your computer and use it in GitHub Desktop.
Save klein-mask/8d4e44916d831f8f9db00a756d211870 to your computer and use it in GitHub Desktop.
{
"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