{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Allow-role",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::*******:role/task-role"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::test-s3/ln/**"
},
{
"Sid": "Allow-ipaddress",
"Effect": "Deny",
"NotPrincipal": {
"AWS": "arn:aws:iam::*******:role/task-role"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::test-s3/ln/**",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": "*.*.*.*/*"
}
}
}
]
}
我具有允许 S3 存储桶中的所有操作的任务角色。但是在访问存储桶时出现访问被拒绝错误。我怀疑拒绝操作会阻止访问,但不知道原因,因为只有当角色不是任务角色时它才应该拒绝。
exception is""Unable to create ln/list/B001480_5060854444548_response.xml on S3",
"loggerName": "c.v.ln.utill.S3BucketHandler", "level": "ERROR", "exception":
"software.amazon.awssdk.services.s3.model.S3Exception: Access Denied
(Service: S3, Status Code: 403, Request ID: 9JJ3FHFYF6TTYHFKWNZZ,
Extended Request ID: S+r7z2sJL2ugf1+ldkjfglskgs=)\n\ta