user1424508
user1424508

Reputation: 3301

read console log on amazon web services for nodejs app

Hi I have a node app deployed via AWS beanstalk.

Is there a way to read the console logs in my node script anywhere on AWS?

Thanks

Upvotes: 0

Views: 1444

Answers (2)

jarmod
jarmod

Reputation: 78842

If you mean the console output, then see the getConsoleOutput SDK reference. For example:

var params = {
  InstanceId: 'STRING_VALUE', // required
  DryRun: true || false,
};
ec2.getConsoleOutput(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Upvotes: 1

SomeKittens
SomeKittens

Reputation: 39522

The only way to read your logs outside of sshing into your instance is to use a third-party service like Logentries or NewRelic.

Upvotes: 1

Related Questions