2013-01-23 13 views
5

Ho un problema con l'API AWS EC2. Ho usato erlawys e erlcloud senza alcun risultato. Con erlawys Creo il modello, ma quando eseguoAPI EC2 Erlang Amazon Web Services (AWS)

aws_ec2_test:test_simple(Key, AccessKey, Model). 

ricevo l'errore

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

L'uscita aws_ec2_xml:describe_image è:

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) 

La funzione http:request/1 è obsoleto.

+1

Sostituire http: richiesta con httpc: request(). aws_ec2: describe_images funziona. –

+0

Comando "aws_ec2: run_instance (Key, AccessKey, Model, InstanceID)." return "{errore, [{eccezione, {errore," tag sconosciuto: Risposta "}}, {stack, [indefinito]}, {ricevuto, {startElement, []," Risposta ", [], [] ]}}]} " –

+0

È corretto in StackOverflow rispondere alla tua domanda e accettarla. Ciò aiuterà gli altri con lo stesso problema di te. – number5

risposta

2

Io uso erlcloud invece di erlawys, perché è molto vecchio e non funziona correttamente.
ercloud è molto grande.
E 'possibile start/stop/creare/eliminare le istanze, gestire le chiavi, ecc ...
Questo è il link git:
https://github.com/gleber/erlcloud
ho inviare una mail allo sviluppatore siccome ho un problema con amazon l'Irlanda. Mi invia questa risposta.

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). 

Questo è il file README. https://github.com/gleber/erlcloud/blob/master/README.md

Problemi correlati