I'm really struggling to gain access to objects in an S3 bucket. Things I've done:
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.
putObject
in 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.
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.
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:
To re-iterate, only do this in development as it may not be recommended for production
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With