
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@openreply/ecs-inspector
Advanced tools
this node module allows you to retrieve information about an ecs instance for the current process
this node module allows you to retrieve information about an ecs instance for the current process.
During discovery this module will perform several http calls against the local ecs agent and the ec2 metadata service. AWS throttles queries to the instance metadata service on a per-instance basis and places limits on the number of simultaneous connections from an instance to the instance metadata service.
you can install this package via npm
npm i @openreply/ecs-inspector
const inspector = require('@openreply/ecs-inspector');
// using the promise interface
inspector().then( result => console.log(result) ).catch( error => console.error(error.message) );
// using callbacks
inspector({callback: (err, result) => {
if (err) {
return console.error(err.message);
}
console.log(result);
}});
Example result
{
cluster: 'default',
arn: 'arn:aws:ecs:eu-central-1:123456789012:task/9c621769-1a09-42c7-8d5d-2ba3319682c7',
dockerId: '2418684f95999553475079f1c6845f5b6cc99a057cbe680a82ad3396db799542',
containerName: 'service-b',
ports: [{
protocol: 'tcp',
container: 3000,
host: 36092
}],
publicHostname: 'some-host.example.com',
publicIpv4: '134.102.200.14',
localHostname: 'private-hostname.internal',
localIpv4: '10.0.1.10'
}
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| protocol | string | protocol used e.g. tcp |
| container | number | port on the container side |
| host | number | port on the host side |
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| arn | string | aws arn uniquely identifying the task |
| cluster | string | name of the cluster |
| dockerId | string | docker id |
| containerName | string | name of the container |
| publicHostname | string | public dns domain name of the ec2 instance (if available) |
| publicIpv4 | string | public ipv4 address of the ec2 instance (if available) |
| localHostname | string | private dns domain name of the ec2 instance (if available) |
| localIpv4 | string | private ipv4 address of the ec2 instance (if available) |
| ports | Array. | docker to host port mapping |
See the API documentation for more details.
You can run the test suite via
npm test
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of authors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
this node module allows you to retrieve information about an ecs instance for the current process
We found that @openreply/ecs-inspector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.