S3 Bucket creation problems


I'm stuck on Exercise 5: Create an Amazon S3 Bucket.

I can get to task 3 Modifying the S3 bucket policy But, when I try to save the policy I receive an unknown error.

Upon clicking on the API response "Invalid principal in policy"

I'm not sure if I missed a critical step in the earlier parts of this course or not.

  • You should provide the policy.

2 Answers

Hi PatCarter,

have a look at this Repost guide about troubleshooting Invalid principal error: https://repost.aws/knowledge-center/s3-invalid-principal-in-policy-error.

If it does not help, please provide more details on what tutorial you are following so we can get it solved.

profile picture
answered 7 months ago
  • Hello, I am doing the Coursera AWS Cloud Technical Essentials. Week 3 it is having me create an employee database, upload a picture and then modify the bucket policy.

    These are the instructions it provided that I am following but I am stumped. :( https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/DEV-AWS-MO-GCNv2/exercise-5-storage.html

  • Did you go through above guide? If so, can you share the policy you added to the S3 bucket?

  • This is what I pasted in per the instructions.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowS3ReadAccess", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:role/S3DynamoDBFullAccessRole" }, "Action": "s3:", "Resource": [ "arn:aws:s3:::employee-photo-bucket-al-907", "arn:aws:s3:::employee-photo-bucket-al-907/*" ] } ] }

  • Should be "Action": "s3:*",

  • I tried it with and without. This exercise is making me feel really dumb lol It's not showing any errors until I try to save it. Then I get API response Invalid principal in policy


This may not be the same issue, but recently we received a question that sounded a lot like this one in rePost. Here's the question and its answers. I hope this helps.


answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions