hapi-aws
v2.0.0
Published
AWS plugin for HapiJS.
Downloads
26
Readme
hapi-aws
AWS plugin for HapiJS.
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