Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Admin level user denied access to S3 objects

I'm really struggling to gain access to objects in an S3 bucket. Things I've done:

  1. IAM user has admin level privileges already
  2. Granted AmazonS3FullAccess
  3. Set the bucket policy to public allowed get...

    {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadForGetBucketObjects",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::images.bucketname.com/*"
        }
    ]
    

    }

I don't want get to be public but I'm just trying to get this to work right now. I had set up a new IAM user for the application itself that will fetch objects as the principal but again, for some reason that didn't work.

  1. I'm uploading the images with putObjectin Node.

Am I missing something here because I'm getting full access denied to everything in S3. I can't open an image even logged in as the root user. I can't download an object. There is no viable way for me to view the images I'm uploading.

All of these buttons within the console either throw a blank error or route to the standard AWS access denied XML page.

enter image description here

On the other hand I can successfully, programmatically, upload files to the bucket using the root users credentials.

What am I missing here? Thanks for the help.

like image 917
Phil Andrews Avatar asked Nov 08 '22 15:11

Phil Andrews


1 Answers

If you just want to access the bucket for some MVP or hobby project and you don't care about security then I would recommend you switch off the default settings of the bucket here:

enter image description here

To re-iterate, only do this in development as it may not be recommended for production

like image 189
B-Tron of the Autobots Avatar answered Nov 15 '22 06:11

B-Tron of the Autobots