Skip to content

Instantly share code, notes, and snippets.

@willwhite
Created December 9, 2014 03:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willwhite/6afe2d333a002c33413f to your computer and use it in GitHub Desktop.
Save willwhite/6afe2d333a002c33413f to your computer and use it in GitHub Desktop.
var concurrency = 100;
var http = require('http');
http.globalAgent.maxSockets = concurrency;
var AWS = require('aws-sdk');
var s3 = new AWS.S3();
for (var i = 0; i < concurrency; i++) {
s3.listBuckets(callback);
}
function callback(err) { if (err) throw err; }
{
"name": "",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"aws-sdk": "^2.0.31"
}
}
@willwhite
Copy link
Author

Ran on node v0.10.33 / c3.large / ubuntu-trusty-14.04-amd64-server-20140927 (ami-98aa1cf0).

@1.0.0 /usr/local/src/metadata-creds
└─┬ aws-sdk@2.0.31
  ├─┬ xml2js@0.2.6
  │ └── sax@0.4.2
  └── xmlbuilder@0.4.2

Receive the following output when concurrency is set to 100 or above:

/usr/local/src/metadata-creds/node_modules/aws-sdk/lib/request.js:32
          throw err;
                ^
CredentialsError: Missing credentials in config
    at createHangUpError (http.js:1476:15)
    at Socket.socketOnEnd [as onend] (http.js:1572:23)
    at Socket.g (events.js:180:16)
    at Socket.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickDomainCallback (node.js:463:13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment