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

@aws-sdk/credential-provider-node

Package Overview
Dependencies
Maintainers
5
Versions
378
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/credential-provider-node

AWS credential provider that sources credentials from a Node.JS environment.

  • 3.326.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19M
decreased by-13.13%
Maintainers
5
Weekly downloads
 
Created

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

The @aws-sdk/credential-provider-node package provides a way to retrieve AWS credentials from various sources within a Node.js environment. It is part of the AWS SDK for JavaScript (v3) and is designed to work seamlessly with other AWS SDK modules to authenticate requests made to AWS services.

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

Loading credentials from environment variables

This feature allows the retrieval of AWS credentials set in environment variables. It is useful when deploying applications on platforms where setting environment variables is the standard way to pass configuration.

const { fromEnv } = require('@aws-sdk/credential-provider-node');
const credentials = fromEnv();

Loading credentials from the shared credentials file

This feature enables the use of AWS credentials stored in the shared credentials file, typically located at ~/.aws/credentials. It is helpful for developers working locally or on EC2 instances with assigned IAM roles.

const { fromIni } = require('@aws-sdk/credential-provider-node');
const credentials = fromIni({ profile: 'my-profile' });

Loading credentials from EC2 Instance Metadata Service

This feature is for retrieving AWS credentials from the EC2 Instance Metadata Service. It is particularly useful for applications running on EC2 instances where IAM roles are used for granting permissions.

const { fromInstanceMetadata } = require('@aws-sdk/credential-provider-node');
const credentials = fromInstanceMetadata();

Loading credentials from ECS Container Metadata Service

This feature fetches AWS credentials from the ECS Container Metadata Service. It is intended for applications running in Amazon ECS containers with Task Roles.

const { fromContainerMetadata } = require('@aws-sdk/credential-provider-node');
const credentials = fromContainerMetadata();

Loading credentials from SSO

This feature allows the loading of AWS credentials via AWS Single Sign-On (SSO). It is useful for users who authenticate through SSO to access multiple AWS accounts.

const { fromSSO } = require('@aws-sdk/credential-provider-node');
const credentials = fromSSO();

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

Keywords

FAQs

Package last updated on 03 May 2023

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