How to use 'aws config credentials get' in JavaScript

Every line of 'aws config credentials get' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
209function getCredentials(privatePath, region) {
210 const fileName = 'aws-project-credentials';
211 const creds = safeReq(path.join(privatePath, fileName + '.json'), fileName);
212 creds.secretAccessKey = creds.secretAccessKey || creds.SecretAccessKey;
213 creds.accessKeyId = creds.accessKeyId || creds.AccessKeyId;
214 creds.region = region;
215 creds.apiVersin = API_VERSION;
216 return creds;
217}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code


Related snippets