I want to attach a File system policy to an AWS EFS (Elastic File System) named fs-01ab01ab01ab123
. Essentially, this is the policy.
File system policy
"Statement": [
{
"Sid": "Mytest",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": [
"elasticfilesystem:ClientRootAccess",
"elasticfilesystem:ClientMount",
"elasticfilesystem:ClientWrite"
],
"Resource": "arn:aws:elasticfilesystem:us-west-2:123412341234:file-system/fs-01ab01ab01ab123",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
}
}
}
]
Note the ARN of the resource in the policy, it's for the same resource (in this case EFS):
"Resource": "arn:aws:elasticfilesystem:us-west-2:123412341234:file-system/fs-01ab01ab01ab123"
My question is, is resource arn required to be specified in the policy attached to the resource, if it's of the same resource? or we can skip that in this case?
And whatever is the answer to this question, does that apply to all AWS resources? My question is specific to EFS though.