Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.