[{"data":1,"prerenderedAt":60},["ShallowReactive",2],{"pattern-s3-cloudfront-oac-cdk-python":3,"pattern-group-s3-cloudfront-oac-cdk-python":59},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":29,"level":30,"meta":31,"patternArch":32,"patternGroup":6,"patternGroupLabel":6,"resources":46,"s3URL":6,"services":6,"stem":54,"testing":55,"videoId":6,"__hash__":58},"patterns\u002Fpatterns\u002Fs3-cloudfront-oac-cdk-python.json","Amazon S3 static website served by Amazon CloudFront with Origin Access Control (OAC)",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Ffaraz-haider.json",{"text":13},[14],"cdk deploy","Serve a static website hosted in a private Amazon S3 bucket through an Amazon CloudFront distribution using Origin Access Control (OAC).","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fs3-cloudfront-oac-cdk-python","serverless-patterns\u002Fs3-cloudfront-oac-cdk-python","s3-cloudfront-oac-cdk-python","app.py",{"headline":25,"text":26},"How it works",[27,28],"This CDK app creates a private S3 bucket, uploads a sample index.html to it, and creates a CloudFront distribution in front of the bucket.","CloudFront reads the bucket content through Origin Access Control (OAC), so the bucket stays private and is only accessible via CloudFront.","Python","200",{},{"icon1":33,"icon2":38,"line1":42},{"x":34,"y":35,"service":36,"label":37},20,50,"cloudfront","Amazon CloudFront",{"x":39,"y":35,"service":40,"label":41},80,"s3","Amazon S3",{"from":43,"to":44,"label":45},"icon1","icon2","Read origin via OAC",{"bullets":47},[48,51],{"text":49,"link":50},"Restricting access to an Amazon Simple Storage Service origin","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fprivate-content-restricting-access-to-s3.html",{"text":52,"link":53},"Hosting a static website using Amazon S3","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002FWebsiteHosting.html","patterns\u002Fs3-cloudfront-oac-cdk-python",{"text":56},[57],"See the GitHub repo for detailed testing instructions.","qYTrkP2tYFCL7b5JEqK-sNGa90Gkp7C0jcqHB0Dfo9U",[],1790246098646]