Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@campus-explorer/aws-credentials
Advanced tools
JavaScript helper code to manage AWS credentials
yarn add @campus-explorer/aws-credentials
import AWS from 'aws-sdk';
import {
getProfileCredentials,
useProfile,
getProfileConfig,
} from '@campus-explorer/aws-credentials';
# Get an AWS.Credentials object for the profile
const credentials = await getProfileCredentials('my-profile');
# Alternatively, set AWS to use the profile
await useProfile('my-profile', AWS.config);
# See if a profile exists
try {
getProfileConfig('my-profile');
} catch (error) {
// doesn't exist
}
This package is similar to AWS.SharedIniFileCredentials, in that it loads credentials using the shared credentials file. However, it adds a few features:
By default, we will cache profiles that end in '-admin' for 1 hour, and all other profiles for 8 hours.
Returns an AWS.Credentials object.
getProfileCredentials(
profile,
{ // optional options
cacheDir, // optional, defaults to ~/.aws/cli/cache
duration, // optional, defaults to duration rules noted above,
getMfaToken, // optional, defaults to using inquirer
},
})
Loads the profile's credential into the environment and the global credentials settings for the AWS SDK. You need to pass your copy of the AWS object.
useProfile({
profile,
AWS,
{
/* ... same options as getProfileCredentials() */
}
})
FAQs
TODO
The npm package @campus-explorer/aws-credentials receives a total of 14 weekly downloads. As such, @campus-explorer/aws-credentials popularity was classified as not popular.
We found that @campus-explorer/aws-credentials demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.