Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-sdk-config-loader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-sdk-config-loader

AWS config file loader for CLI tools

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

aws-sdk-config-loader

NPM version NPM downloads Build Status Coverage Status DevDependency Status License

AWS config file loader for CLI tools.

this library load ~/.aws/config that aws-sdk-js is not supported.

Installation

npm install aws-sdk-config-loader aws-sdk

Usage

API Document: https://moqada.github.io/aws-sdk-config-loader/

put following ~/.aws/credentials

[default]
aws_access_key_id = default_key_id
aws_secret_access_key = default_secret_key
[foo]
aws_access_key_id = foo_key_id
aws_secret_access_key = foo_secret_key

put following ~/.aws/config.

[default]
region = ap-northeast-1
[foo]
region = us-east-1
import AWS from 'aws-sdk';
import loader from 'aws-sdk-config-loader';

loader(AWS);
// AWS.config.region === 'ap-northeast-1'
// AWS.config.credentials.accessKeyId = 'default_key_id'
// AWS.config.credentials.secretAccessKey = 'default_secret_key'

// export AWS_PROFILE=foo
loader(AWS);
// AWS.config.region === 'us-east-1'
// AWS.config.credentials.accessKeyId = 'foo_key_id'
// AWS.config.credentials.secretAccessKey = 'foo_secret_key'

// export AWS_CONFIG_FILE=/path/to/config
loader(AWS);
// set AWS.config from /path/to/config

loader(AWS, {profile: 'foo'})
// AWS.config.region === 'us-east-1'
// AWS.config.credentials.accessKeyId = 'foo_key_id'
// AWS.config.credentials.secretAccessKey = 'foo_secret_key'

loader(AWS, {profile: 'foo', noReflectCredentials: true})
// AWS.config.region === 'us-east-1'
// AWS.config.credentials.accessKeyId = 'default_key_id'
// AWS.config.credentials.secretAccessKey = 'default_secret_key'

Keywords

FAQs

Package last updated on 22 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc