1 Answers
I have figured it out. So this thread can be closed. What I have to do is after the specific s3 bucket ARN, I need to add "/*". So the inline policy will then become as below. Only then, IAM user under that group is denied PutObject in the s3 bucket specified by arn:aws:s3:::mynewstaticwebsite90210. So specific DENY trumps over ALLOW via the IAM policy.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1601471245000",
"Effect": "Deny",
"Action": [
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::mynewstaticwebsite90210/*"
]
}
]
}