AWS plugin for hapi-aws.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
lib
test
.editorconfig
.eslintrc
.gitignore
.travis.yml
LICENSE.md
README.md
package-lock.json
package.json
yarn.lock

README.md

hapi-aws

AWS plugin for HapiJS.

travis build codecov coverage version downloads semantic-release

Dependency Status devDependency Status Build Status

Install

$ npm install hapi-aws

Usage

// Using server register.

server.register({
    register: require('hapi-aws'),
    options: {
        global: {
            accessKeyId: 'accessKeyId',
            secretAccessKey: 'secretAccessKey',
            region: 'us-east-1'
        },
        services: [{
            name: 'ec2Identification',
            service: 'EC2',
            options: {
                accessKeyId: 'anotherAccessKeyId',
                secretAccessKey: 'anotherSecretAccessKey',
            }
        }, {
            name: 's3Identification',
            service: 'S3',
            options: {
                region: 'us-west-2'
            }
        }]
    }
})

// Using manifest.
{
    ...
    registration: [{
        plugin: 'hapi-aws',
        options: {
            global: {
                accessKeyId: 'accessKeyId',
                secretAccessKey: 'secretAccessKey',
                region: 'us-east-1'
            },
            services: [{
                name: 's3Identification',
                service: 'S3',
                options: {
                    region: 'us-west-2'
                }
            }]
        }
    }]
}

AWS Supported services

Check the following services here: AWS Services

When passing a service please drop the AWS namespace example:

service.name: [string] used later to access the service like: server.plugins['hapi-aws'].aws.ec2Identification

service.service: [string] from the previous list exmple: EC2