Gio*_*i C 5 erlang amazon-ec2 amazon-web-services
我的AWS EC2 API存在问题.我已经使用过erlawys,erlcloud没有任何结果.使用erlawys我创建了模型,但是当我执行时
aws_ec2_test:test_simple(Key, AccessKey, Model).
Run Code Online (Sandbox Code Playgroud)
我收到错误
Failed in calling #Fun<aws_ec2_test.0.112913818> on count 100 from 100 to 0.
Run Code Online (Sandbox Code Playgroud)
输出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)
Run Code Online (Sandbox Code Playgroud)
该功能http:request/1已过时.
我使用 erlcloud 而不是 erlawys,因为它非常旧并且无法正常工作。
ercloud 非常棒。
可以启动/停止/创建/删除实例,管理密钥,ecc...
这是 git 链接:
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).
Run Code Online (Sandbox Code Playgroud)
这是自述文件。 https://github.com/gleber/erlcloud/blob/master/README.md