Reduce boilerplate code when configuring the AWS Node.js SDK. http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html
Takes care of the following:
- Handles corporate proxy via https-proxy-agent if
HTTPS_PROXY
environment variable exists. - Utilize a named profile from
.aws/credentials
file ifprofile
option specified - Support
AWS_TIMEOUT
environment variable to enforce a maximum timeout for all AWS SDK operations - Honors the
AWS_DEFAULT_PROFILE
andAWS_DEFAULT_REGION
environment variables used by the AWS CLI. - Honors the
AWS_WEB_IDENTITY_TOKEN_FILE
environment variable used for web token based authentication for kubernetes service accounts
Installation
npm install aws-config
Options
;
Usage
var AWS = ;var awsConfig = ; // demonstrating different sample usage at the individual service levelvar s3 = ;var ec2 = ;var dynamo = ; // you can also set the AWS config globally and use empty constructors on// individual services.AWSconfig = ; var s3 = ;