Sha256: 4ebbb55551c775eb1d51db5084b3b1ce3348ddaf294b6f8051bcb1cac672c400

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

# AwsClient

This gem wraps access to various AWS APIs under one umbrella.  The following are configured:

* RDS
* Cloudformation
* S3
* EC2

It exposes access to the above APIs from a single flex-point.

## Rationale

The use cases covered are in no way exhaustive - this aids in solving very specific problems.

## Installation

### Assumptions

You will need a file named .fog in your home directory. The format is as follows:

```
  ORG_KEY:
    aws_access_key_id: ACCESS_KEY
    aws_secret_access_key: SECRET_ACCESS_KEY
```

then you will need to

```
  gem install aws_client
```

Then include it in your project

```
  require 'aws_client'
```

### Usage

#### Connnecting

```
  # ::AwsClient::Container.new(ORG_KEY, AWS_REGION, PROVISIONING_REGION) e.g.
  aws_clients = ::AwsClient::Container.new(ORG_KEY, "eu-west", "eu-west-1")

  # Rds client wrapper
  rds_client = aws_clients.rds

  # Cloudformation client wrapper
  cf_client = aws_clients.cloudformation

  # S3 client wrapper
  s3_client = aws_clients.s3

  # EC2 client wrapper
  ec2_client = ec2_client.ec2
```

Each client wrapper above is merely a wrapper for the underlying AWS client, from which the underlying client may be exposed, e.g.

```
  aws_clients = ::AwsClient::Container.new("My organisation", "eu-west", "eu-west-1")
 
  # Wrapper
  rds_client = aws_clients.rds

  # Underlying client
  underlying_client = rds_client.client 
```

Each client wrapper exposes some additional functionality useful to me, but may easily be monkey patched to add functionality  (I find working with AWS APIs often exhausting, especially when working with Cloudformation where orchestration tasks may involve the use of multiple APIs in sequence).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aws_client-0.0.2 README.md