Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect https_proxy environment variable and allow SDK to discover credentials #12

Merged
merged 1 commit into from
Jul 15, 2015
Merged

Conversation

dvonlehman
Copy link

I'm running behind a corporate proxy and calls to AWS require explicitly setting the httpOptions.agent property. This requires taking on a dependency to https-proxy-agent. Ideally the SDK would have this functionality built-in

if (process.env.HTTPS_PROXY) {
  var HttpsProxyAgent = require('https-proxy-agent');
  AWS.config.httpOptions.agent = new HttpsProxyAgent(process.env.HTTPS_PROXY);
}

The second change eliminates the requirement to specify the accessKeyId and secretAccessKey. The SDK will automatically discover credentials via the shared credentials file (~/.aws/credentials) or environment variables. These techniques are recommended over the accessKeyId and secretAccessKey properties, but they are still supported.

eliminate requirement to explicitly pass in 
AWS credentials and instead let the SDK discover
them via it's built-in mechanisms.
@clineamb clineamb merged commit 37e4642 into clineamb:master Jul 15, 2015
@clineamb
Copy link
Owner

Added! Thanks for this! (:

@clineamb clineamb mentioned this pull request Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants