Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl AWS Error

by cbtshare (Monk)
on Feb 12, 2016 at 20:46 UTC ( [id://1155127]=note: print w/replies, xml ) Need Help??


in reply to Perl AWS Error

Thank you for your reply -raise_error helped alot, the code is verbatim from the module webpage, and it does compile if I just have the lines below.

my $ec2 = VM::EC2->new(-access_key => 'wew23232', -secret_key => '3232323', -endpoint=> 'http://ec2.amazonaws.com', ); #Get image my $image = $ec2->describe_images('ami-469e1d2a');

I also do have an image created and set it as the image code $ec2->describe_images('ami-469e1d2a'), but was getting an error which was solved by sync the server clock.

Now I am getting the error from the modified code

[595] No such device or address, at API call 'DescribeImages')

#!/usr/local/perl-5.23.3/perl use strict; use warnings; use VM::EC2; my $ec2 = VM::EC2->new(-access_key => 'AKIAJQc', -secret_key => 'J3jCAvb2+six', -endpoint=> 'http://ec2.amazonaws.com', -raise_error=> '1', -region=> 'sa-east-1a', ); #Get image my $image = $ec2->describe_images('ami-469e1d2a'); # get some information about the image my $architecture = $image->architecture; my $description = $image->description; my @devices = $image->blockDeviceMapping; for my $d (@devices) { print $d->deviceName,"\n"; print $d->snapshotId,"\n"; print $d->volumeSize,"\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1155127]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2026-02-18 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.