I’m trying to set up an S3 Express Zone storage class, which only works with directory buckets.
To allow public access to the file, I understand I need to create a CloudFront distribution, which I did.
When creating the following bucket policy:
{
"Version": "2012-10-17",
"Statement": {
"Sid": "AllowCloudFrontServicePrincipalReadOnly",
"Effect": "Allow",
"Principal": {
"Service": "cloudfront.amazonaws.com"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3express:eu-north-1:851725228246:bucket/gscript--eun1-az1--x-s3/*",
"Condition": {
"StringEquals": {
"AWS:SourceArn": "arn:aws:cloudfront::851725228246:distribution/ED3ORK2PVOR4C"
}
}
}
}
I get the following error : Policy has invalid action
Error screenshot
I tried several syntax, but I can’t create that policy. I’m also exploring other option to make that directory bucket available online, any idea welcome.
I also tried to add the following as an IAM policy just in case, it doesn’t change anything:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::arn:aws:s3express:eu-north-1:851725228246:bucket/gscript--eun1-az1--x-s3/*"
}
]
}
antoine_brly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.