Socket
Socket
Sign inDemoInstall

@aws-sdk/credential-provider-process

Package Overview
Dependencies
Maintainers
4
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/credential-provider-process

AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config


Version published
Weekly downloads
19M
increased by4.15%
Maintainers
4
Weekly downloads
 
Created

Package description

What is @aws-sdk/credential-provider-process?

The @aws-sdk/credential-provider-process package is part of the AWS SDK for JavaScript (v3) and is used to load AWS credentials from a process specified in the shared AWS config and credentials files. This is useful for scenarios where you want to source credentials from an external process, which can be a custom credential provider or a token service.

What are @aws-sdk/credential-provider-process's main functionalities?

Loading credentials from a process

This feature allows you to load AWS credentials by executing a process defined in your AWS config file. The credentials returned by the process are then used to authenticate AWS SDK clients.

const { fromProcess } = require('@aws-sdk/credential-provider-process');

const credentials = fromProcess();
// Use credentials with an AWS SDK client
const client = new SomeAwsClient({ credentials });

Other packages similar to @aws-sdk/credential-provider-process

Readme

Source

AWS Credential Provider for Node.JS - Shared Configuration Files

NPM version NPM downloads

This module provides a function, fromSharedConfigFiles that will create CredentialProvider functions that read from a shared credentials file at ~/.aws/credentials and a shared configuration file at ~/.aws/config. Both files are expected to be INI formatted with section names corresponding to profiles. Sections in the credentials file are treated as profile names, whereas profile sections in the config file must have the format of[profile profile-name], except for the default profile. Please see the sample files below for examples of well-formed configuration and credentials files.

Profiles that appear in both files will not be merged, and the version that appears in the credentials file will be given precedence over the profile found in the config file.

Supported configuration

You may customize how credentials are resolved by providing an options hash to the fromSharedConfigFiles factory function. The following options are supported:

  • profile - The configuration profile to use. If not specified, the provider will use the value in the AWS_PROFILE environment variable or a default of default.
  • filepath - The path to the shared credentials file. If not specified, the provider will use the value in the AWS_SHARED_CREDENTIALS_FILE environment variable or a default of ~/.aws/credentials.
  • configFilepath - The path to the shared config file. If not specified, the provider will use the value in the AWS_CONFIG_FILE environment variable or a default of ~/.aws/config.

Sample files

~/.aws/credentials

[default]
credential_process = /usr/local/bin/awscreds

[dev]
credential_process = /usr/local/bin/awscreds dev

[prod]
credential_process = /usr/local/bin/awscreds prod

~/.aws/config

[default]
credential_process = /usr/local/bin/awscreds

[profile dev]
credential_process = /usr/local/bin/awscreds dev

[profile prod]
credential_process = /usr/local/bin/awscreds prod

Keywords

FAQs

Package last updated on 29 Oct 2019

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc