in reply to Re: PERL to AWS
in thread PERL to AWS
I've been using AWS::CLIWrapper for some time.
Thank you for pointing this out, it inspired me to release IPC::Run3::Shell::CLIWrapper, which is a more generic tool, but allows me to write my previous example as the following. The set-up may look a little more complicated, but the actual calls are much simplified. And since I wrote IPC::Run3::Shell, I can be certain of its behavior :-)
use warnings; use strict; use IPC::Run3::Shell::CLIWrapper; use JSON::PP qw/decode_json/; use Data::Dumper; my $s3api = IPC::Run3::Shell::CLIWrapper->new( { fail_on_stderr => 1, stdout_filter => sub { $_=decode_json($_) } }, qw/ aws --profile MyProfile --output json s3api /); my $buckets = $s3api->list_buckets; print Dumper($buckets);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: PERL to AWS
by jo37 (Curate) on May 18, 2020 at 09:16 UTC | |
by haukex (Archbishop) on May 18, 2020 at 09:25 UTC |