JSPM

aws-instance-identity-certificates

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q53676F
  • License MIT

Public certificates for AWS Instance Identity Documents. Useful when publishing EC2 AMIs via the AWS Marketplace.

Package Exports

  • aws-instance-identity-certificates
  • aws-instance-identity-certificates/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-instance-identity-certificates) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aws-instance-identity-certificates

Overview

aws-instance-identity-certificates is an npm module that provides utilities for working with AWS instance identity documents and certificates. It helps in verifying the identity of EC2 instances and ensures secure communication between services.

The verification process is taken from the AWS documentation: Verify the instance identity document for an Amazon EC2 instance

The certificates are scraped from this wonderfully user hostile format for supplying certificates

Installation

To install the module, use npm:

npm install aws-instance-identity-certificates

Usage

Here is an example of how to use the module:

const { verifyIdentityDocument } = require('aws-instance-identity-certificates');

const document = '...'; // Your instance identity document
const signature = '...'; // The corresponding signature

verifyIdentityDocument(document, signature)
  .then(isValid => {
    if (isValid) {
      console.log('The identity document is valid.');
    } else {
      console.log('The identity document is invalid.');
    }
  })
  .catch(error => {
    console.error('Error verifying identity document:', error);
  });

API

verifyIdentityDocument(document, signature)

Verifies the given instance identity document and its signature.

  • document (string): The instance identity document.
  • signature (string): The signature of the document.

Returns a promise that resolves to a boolean indicating whether the document is valid.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.