spurious-aws-sdk-helper
v1.0.1
Published
Helper module for configuring the JS AWS SDK with spurious details
Downloads
10
Readme
A helper module for configuring the js aws-sdk
to talk to the spurious services.
Installation
$ npm install --save-dev spurious-aws-sdk-helper
Usage
You can configure the aws-sdk
two different ways:
- Shelling out to the CLI tool for the current port mappings
- Getting current port mappings from linked docker containers
CLI strategy
Generally you have this setup done at the entry point of your application or in a di container:
require('spurious-aws-sdk-helper')()
Docker strategy
If you're running the application in a container on the same host as spurious then you can pass in the following linked containers:
docker run ... --link spurious-s3:s3.spurious.localhost --link spurious -sqs:sqs.spurious.localhost --link spurious-dynamo:dynamodb.spurious.localhost
then inside your application:
require('spurious-aws-sdk-helper')('docker')
Contributing
- Fork it ( https://github.com/spurious-io/js-aws-sdk-helper/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request