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'); #### #!/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"; }