node.jsamazon-web-servicespkgcloud

how to get list of public images of aws using pkgcloud?


i am trying to launch instance on aws using pkgcloud so for that image option is must, so i used bellow code to get list of images.

aws = pkgcloud.compute.createClient({
        provider:'amazon',
        key:'',
        keyId:''
    });
aws.getImages(function (err, images) { 
        console.log(images);
    });

but above API returns empty array. so how do i get list of all public images available on aws?

any suggestion ?


Solution

  • I had the same problem and could not find any answer. So I stopped using pkgcloud and started with aws-sdk instead which is directly provided by Amazon. It has much better documentation and works like a charm.