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

0

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.

https://aws.amazon.com/blogs/developer/downloading-objects-from-amazon-s3-using-the-aws-sdk-for-ruby/

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 Aws::S3::Client.new and get_object, but nothing seems to be suppressing body getting logged to console.

Could anyone here advise?

Thanks

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

質問済み 4年前575ビュー
2回答
0

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

回答済み 4年前
0

Answered own question

回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ