2013-01-23 26 views
5

AWS EC2 API ile ilgili bir sorunum var. Herhangi bir sonuç olmadan erlawys ve erlcloud kullandım. erlawys ile ben model oluşturmak, amaErlang Amazon Web Hizmetleri (AWS) EC2 API

aws_ec2_test:test_simple(Key, AccessKey, Model). 

yürütmek zaman aws_ec2_xml:describe_image çıktısıdır

Failed in calling #Fun<aws_ec2_test.0.112913818> on count 100 from 100 to 0. 

hata alırsınız: http:request/1 kullanılmıyor

aws_ec2:describe_images(Key, AccessKey, Model). 
** exception error: undefined function http:request/1 
    in function aws_ec2_xml:describe_images/5 (../src/aws_ec2_xml.erl, line 364) 
    in call from aws_ec2:describe_images/6 (../src/aws_ec2.erl, line 222) 

fonksiyonunu.

+1

http: isteğini httpc: request() ile değiştiriyorum. aws_ec2: define_images çalışması. –

+0

Komut "aws_ec2: run_instance (Anahtar, AccessKey, Model, InstanceID)." "{error, [{exception, {error," unknown tag: Response "}}, {stack, [undefined]}, {alınan, {startElement, []," Response ", [], [ ]}}]} " –

+0

StackOverflow'ta kendi sorunuzu cevaplamak ve kabul etmek doğru. Bu, seninle aynı sorunu olan diğerlerine yardım edecektir. – number5

cevap

2

Erlawys yerine erlcloud kullanıyorum, çünkü çok eski ve iyi çalışmıyor.
ercloud çok iyi.
Öyle olası başlangıç ​​/ tuşları, ecc ...
Bu git bağlantı yönetmek, örneklerini silmek oluşturmak// durdurma: Ben amazon İrlanda ile ilgili bir sorun nedeniyle bu derste ben geliştirici posta göndermek
https://github.com/gleber/erlcloud
. Bu yanıtı bana gönderir.

start_instance(Ami, KeyPair, UserData, Type, Zone) -> 
Config = #aws_config{ 
     access_key_id = application:get_env(aws_key), 
     secret_access_key = application:get_env(aws_secret) 
     }, 

InstanceSpec = #ec2_instance_spec{image_id = A`enter code here`mi, 
            key_name = KeyPair, 
            instance_type = Type, 
            availability_zone = Zone, 
            user_data = UserData}, 
erlcloud_ec2:run_instances(InstanceSpec, Config). 

Bu README dosyasıdır. https://github.com/gleber/erlcloud/blob/master/README.md