Skip to content

arpunk/nube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nube

LFE wrapper for the erlcloud library

Introduction

Nube serves as a wrapper for the different AWS services the erlcloud Erlang library supports with some extra macros to make your life easier.

Installation

To install and use the library just add it to your rebar.config deps:

  {deps, [
    {nube, {git, "[email protected]:arpunk/nube.git", {branch, "master"}}}
  ]}.

Then get and compile the dependencies:

    $ rebar3 compile

Documentation

Supported AWS services

  • EC2
  • ELB
  • S3
  • SDB
  • SQS
  • STS
  • SNS
  • Kinesis
  • IAM
  • AutoScaling
  • CloudTrail
  • Mechanical Turk
  • CloudWatch
  • DynamoDB

Usage

Quickstart

Make sure you have exported your AWS credentials:

    export AWS_ACCESS_KEY_ID="access key"
    export AWS_SECRET_ACCESS_KEY="secret access key"

Then fire up a repl:

    $ rebar3 lfe repl
    ...
    > (nube:start)
    ok
    > (nube-ec2:describe-images)

Or you can just create the credentials:

    (let ((credentials (nube-util:make-crendentials "access key"
                                                    "secret access key")))
      (nube-ec2:describe-images credentials))

More advanced

(let* ((instance-spec (make-ec2_instance_spec image_id "ami"
                                              key_name "keypair"
                                              instance_type "t2.micro"
                                              availability_zone "us-east-1c"))
       (instance (nube-ec2:run-instances instance-spec))
    (lfe_io:format "Instance: ~p~n" (list instance))))

License

MIT

About

LFE wrapper for the erlcloud library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages