Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I get the tasks running as part of an ECS service?

I would like to read the tasks running on a service through aws-sdk nodejs. I tried describeServices API but there is no information about the tasks.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Tasks are running on a cluster and managed by a service. You need to use the ListTasks API to get more information about the tasks in a cluster that belong to a certain service.

The API call should look something like this:

var params = {
  cluster: '<cluster-name>',
  serviceName: '<service-name>'
};
ecs.listTasks(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading