Erlang Amazon Web Services (AWS) API EC2

I have a problem with the AWS EC2 API. I used erlawysand erlcloudwithout any results. With erlawys I create a model, but when I execute

aws_ec2_test:test_simple(Key, AccessKey, Model).

I get an error

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

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

Function is http:request/1deprecated.

+5
source share
1 answer

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

README. https://github.com/gleber/erlcloud/blob/master/README.md

+2

All Articles