2013-01-23 15 views
5

AWS EC2 API에 문제가 있습니다. erlawyserlcloud을 아무런 결과없이 사용했습니다. erlawys으로 I는 모델을 생성하지만AWS EC2 API

aws_ec2_test:test_simple(Key, AccessKey, Model). 

을 실행할 때 I은 aws_ec2_xml:describe_image의 출력은

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

오류가 나타날 http:request/1가 쓸모

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) 

기능.

+1

http : request를 httpc : request()로 바꿉니다. aws_ec2 : describe_images가 작동합니다. –

+0

명령 "aws_ec2 : run_instance (Key, AccessKey, Model, InstanceID)." return "{오류, [{예외, {오류,"알 수없는 태그 : 응답 "}}, {stack, [undefined]}, {받은 {startElement, [],"응답 ", [ ]}}] "" –

+0

StackOverflow에서 자신의 질문에 대답하고 받아들이는 것이 적절합니다. 그것은 당신과 같은 문제를 가진 다른 사람들을 도울 것입니다. – number5

답변

2

에를 라위 대신 erlcloud를 사용합니다. 아주 오래되어 잘 작동하지 않기 때문입니다.
ercloud 매우 좋습니다.
그것이 가능한 시작/키, ECC ...
이것은 자식 링크가 관리, 인스턴스를 생성/삭제/중지 : 나는 아마존 아일랜드에 문제가 렸기 때문에 내가 개발자에게 메일을 보내
https://github.com/gleber/erlcloud
합니다. 그는이 응답을 내게 보냅니다.

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

이것은 README 파일입니다. https://github.com/gleber/erlcloud/blob/master/README.md