You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error occurred (AccessDenied) when calling the PutBucketPolicy operation: Access Denied
Analysis
The error indicates that the operation was denied due to access control restrictions on the S3 bucket. This typically happens when the bucket has public access policies that block changes to bucket policies.
Fix
To resolve this issue, I had to disable the BlockPublicPolicy setting on the S3 bucket. The following command was used to update the bucket's public access block configuration:
After running the above command, I was able to successfully execute the original put-bucket-policy command without encountering the Access Denied error.
Additional Note
The command also ensures that "Block all public access" is turned off for all four settings, which is required before the pages are served.
The text was updated successfully, but these errors were encountered:
Problem
I am referring to this page: https://github.com/fourTheorem/serverless-ecommerce-workshop/tree/main/lessons/01-deploying-the-frontend
When I tried to run this command under the "Bucket policies" section:
aws s3api put-bucket-policy --bucket $FRONTEND_BUCKET --policy file://policy.json
I encountered the following error:
Analysis
The error indicates that the operation was denied due to access control restrictions on the S3 bucket. This typically happens when the bucket has public access policies that block changes to bucket policies.
Fix
To resolve this issue, I had to disable the BlockPublicPolicy setting on the S3 bucket. The following command was used to update the bucket's public access block configuration:
After running the above command, I was able to successfully execute the original put-bucket-policy command without encountering the Access Denied error.
Additional Note
The command also ensures that "Block all public access" is turned off for all four settings, which is required before the pages are served.
The text was updated successfully, but these errors were encountered: