Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

389
Views
Why is an S3 object without public permissions accessible through http.get() in Node.js?

I have an S3 object that is publicly not available. If you click on that link, you should get the <code>Access Denied</code> error.

However, if I run the following script on a Node server locally on my Mac, I'm able to download the file -

var s3file = fs.createWriteStream("s3posts.json.gz");
http.get("http://s3.amazonaws.com/cloudfront.s3post.cf/posts.json.gz", function(response) {
    response.pipe(s3file);
});

I went through all of my bucket and object configuration; there's nothing allowing the object to be accessed publicly.

If AWS's policies are by private by default and I haven't explicitly given any permissions, why is the object available for download while not being available on the browser?

What can I do to prevent the object from being downloaded?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Have you seen what actually gets downloaded by that script?

When I run your Node example on my machine, here is the contents of s3posts.json.gz:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code><Message>Access Denied</Message>
<RequestId>946B9510D519E44B</RequestId>
<HostId>eMlB8tG95Ur5fjIHo/NxfI6Ucjs/b4vcMNKYiZPZk94Db6BgrekTRVoaJTccxmQqN1eb91O673A=</HostId>
</Error>

It seems that everything is fine, unless that is indeed the real contents of that file that you want to protect.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!