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

@aws-sdk/shared-ini-file-loader

Package Overview
Dependencies
Maintainers
5
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/shared-ini-file-loader

This module provides a function that reads from AWS SDK configuration files and returns a promise that will resolve with a hash of the parsed contents of the AWS credentials file and of the AWS config file. Given the [sample files](#sample-files) below,

  • 0.1.0-preview.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2M
decreased by-7.28%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/shared-ini-file-loader?

@aws-sdk/shared-ini-file-loader is a package from the AWS SDK for JavaScript that provides utilities for loading and parsing AWS credentials and configuration from INI files. This is particularly useful for managing multiple AWS profiles and credentials in a standardized way.

What are @aws-sdk/shared-ini-file-loader's main functionalities?

Load AWS Credentials from INI File

This feature allows you to load AWS credentials from the shared INI file. The `loadSharedConfigFiles` function reads the credentials and configuration files and returns their contents.

const { loadSharedConfigFiles } = require('@aws-sdk/shared-ini-file-loader');

async function loadCredentials() {
  const { credentialsFile } = await loadSharedConfigFiles();
  console.log(credentialsFile);
}

loadCredentials();

Load AWS Configurations from INI File

This feature allows you to load AWS configurations from the shared INI file. The `loadSharedConfigFiles` function reads the configuration file and returns its contents.

const { loadSharedConfigFiles } = require('@aws-sdk/shared-ini-file-loader');

async function loadConfig() {
  const { configFile } = await loadSharedConfigFiles();
  console.log(configFile);
}

loadConfig();

Parse Specific Profile

This feature allows you to parse and load a specific AWS profile from the shared INI files. The `parseKnownFiles` function can be used to specify which profile to load.

const { parseKnownFiles } = require('@aws-sdk/shared-ini-file-loader');

async function loadProfile(profileName) {
  const { credentialsFile, configFile } = await parseKnownFiles({ profile: profileName });
  console.log(credentialsFile[profileName], configFile[profileName]);
}

loadProfile('my-profile');

Other packages similar to @aws-sdk/shared-ini-file-loader

FAQs

Package last updated on 19 Nov 2018

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