To allow a ceratin resource to access a S3 bucket, use the following IAM policy:
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::<bucketName>/*",
"arn:aws:s3:::<bucketName>"
]
}