aws-ecs-metadata-node
v1.2.0
Published
A tool to retrieve AWS ECS Task metadata
Downloads
1,055
Maintainers
Readme
A library for nodejs
aws-ecs-metadata-node is a NodeJS library to fetch and retrieve the meta data of a ECS service. There's also another version built for golang by Bruno Scheufler
Installation
Use the package manager npm to install aws-ecs-metadata-node.
npm install aws-ecs-metadata-nodeor with yarn:
yarn add aws-ecs-metadata-nodeUsage
import { fetchMetaData as v3 } from 'aws-ecs-metadata-node/lib/v3';
import { fetchMetaData as v4 } from 'aws-ecs-metadata-node/lib/v4';
// to fetch from version 3 endpoint
v3().then((res) => {
console.log(res);
});
// to fetch from version 4 endpoint
v4().then((res) => {
console.log(res);
});An aws-ecs-metadata-node bin is also provided, which will log the discovered metadata as JSON.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
