If I want to give access to only S3 bucket named A and deny rest all, can’t I just use Effect : Allow and resource as A ? Do I really need to specify Deny for rest of buckets ?
How can we get list of action needed for anything for example console access ? If you see below there are 6 actions mentioned for console access, how can we get this ?
What does SID here means and can write any meaningful text ?
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ConsoleAccess",
"Effect": "Allow",
"Action": [
"s3:GetAccountPublicAccessBlock",
"s3:GetBucketAcl",
"s3:GetBucketLocation",
"s3:GetBucketPolicyStatus",
"s3:GetBucketPublicAccessBlock",
"s3:ListAllMyBuckets"
],
"Resource": ""
},
{
"Sid": "ListObjectsInBucket",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": ["arn:aws:s3:::bucket-name"]
},
{
"Sid": "AllObjectActions",
"Effect": "Allow",
"Action": "s3:Object",
"Resource": ["arn:aws:s3:::bucket-name/*"]
}
]