I have a CloudFormation Stack created from a Serverless YAML file.
One of the resources is this:
"S3BucketWebRoot": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketName": "samhain.today",
"AccessControl": "PublicRead",
"WebsiteConfiguration": {
"IndexDocument": "index.html",
"ErrorDocument": "404.html"
}
}
}
I'm having no problems deploying the Stack files (which includes creating an S3 bucket, itself), but when the Stack starts to get built, I'm getting:
14:38:46 UTC-0500 CREATE_FAILED AWS::S3::Bucket S3BucketWebRoot API: s3:CreateBucket Access Denied
Problem is, the User associated with the Serverless service has, as part of its policy:
{
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket",
"s3:DeleteObject",
"s3:DeleteBucket",
"s3:ListBucketVersions"
],
"Resource": [
"arn:aws:s3::*:*"
]
}
How do I even go about debugging this? Either my Resource is wrong, or its some other user being used, but that makes no sense because they're attached to an Access Key ID.