Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-instance-metadata

Package Overview
Dependencies
Maintainers
33
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-instance-metadata

A utility for retrieving the desired AWS EC2 instance metadata from a running instance

  • 2.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
90
increased by7.14%
Maintainers
33
Weekly downloads
 
Created
Source

aws-instance-metadata

This module is used to retrieve a piece of metadata for a running AWS EC2 instance. It returns takes a callback in order to return the data.

Install

npm install aws-instance-metadata

or

npm install aws-instance-metadata --save

Usage

When using raven.js, it's common to add server level information for debugging purposes. We can use aws-instance-metadata to do just that. In order to tag all future error messages with the instance ID, we could do:

const raven = require('raven').Client(/* configuration omitted */);
const awsInstanceMetadata = require('aws-instance-metadata');

awsInstanceMetadata.fetch('instance-id').then((instanceId) => {
  raven.setTagsContext({
    instanceId: instanceId
  });
}, console.error);

Publishing a new version

GH_TOKEN=xxx npx semantic-release --no-ci

Keywords

FAQs

Package last updated on 10 Jul 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc