Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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
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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.