By using AWS re:Post, you agree to the Terms of Use

Using aws-sdk-s3 get_object to stream file to disk


I'm basically using an example from this page to download a file from s3. If it matters, I'm using it in a ruby_block in chef. it works, but it echo's the file contents to the console. I'm trying to avoid that.

reap = s3.get_object({ bucket:'bucket-name', key:'object-key' }, target: file)

The above is downloading the file, but logging everything to console.

I've tried numerous configs setting in the class list for and get_object, but nothing seems to be suppressing body getting logged to console.

Could anyone here advise?


Edited by: Kevin Blackwell on Mar 16, 2020 8:50 AM

asked 3 years ago51 views
2 Answers

My bad, had to remove http_wire_trace, setting it to false didn’t seem to work for me, but removing worked.

Live and learn

answered 3 years ago

Answered own question

answered 3 years 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