I have a problem with the AWS EC2 API. I have used erlawys
and erlcloud
without any result. With erlawys I create the model, but when I execute
aws_ec2_test:test_simple(Key, AccessKey, Model).
I receive the error
Failed in calling #Fun<aws_ec2_test.0.112913818> on count 100 from 100 to 0.
The output of aws_ec2_xml:describe_image
is:
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)
The function http:request/1
is obsolete.
I use erlcloud instead of erlawys, because it is very old and It not works fine.
ercloud is very great.
It is possible start/stop/create/delete instances, manage keys, ecc...
This is the git link:
https://github.com/gleber/erlcloud
I send mail to the developer becouse I have a problem with amazon Ireland.
He sends me this response.
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).
This is the README file. https://github.com/gleber/erlcloud/blob/master/README.md
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With