DEV Community

Discussion on: Host Static website using AWS CDK for Terraform and CloudFront: Part 2

 
thakkaryash94 profile image
Yash Thakkar

We have setup CloudFront Origin Access Identity(OAI) and also updated the S3 bucket permission as below.
{
"AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity ${cloudfrontOriginAccessIdentity.id}"
}

So with this, only CloudFront will be able to access the bucket using OAI.