From c082008dd7b26d720d3c91e77c0491174c1c511e Mon Sep 17 00:00:00 2001 From: Louis Phang <7659194+louis-pvs@users.noreply.github.com> Date: Mon, 28 Mar 2022 18:43:10 +0800 Subject: [PATCH] Policy streamline to resolve access denied error Wish i was there in the class to help, but this should resolve the issue on error code 403. --- content/12 - Using OAI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/12 - Using OAI.md b/content/12 - Using OAI.md index 7a08568..a037037 100644 --- a/content/12 - Using OAI.md +++ b/content/12 - Using OAI.md @@ -23,8 +23,8 @@ If AWS fails at updating your bucket policy on your behalf, you can do it yourse "Principal": { "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity EP6AJZA5FKG3P" }, - "Action": "s3:GetObject", - "Resource": "arn:aws:s3:::superawesome.xyz/*" + "Action": ["s3:GetObject", "s3:Listbucket"], + "Resource": ["arn:aws:s3:::superawesome.xyz/*", "arn:aws:s3:::superawesome.xyz"] } ] }