hapi-aws

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i hapi-aws

Weekly Downloads

8

Version

2.0.0

License

LICENSE.md

Unpacked Size

148 kB

Total Files

10

Last publish

Collaborators

  • ar4mirez