2.0.0 • Published 7 days ago

@prairielearn/aws-imds v2.0.0

Weekly downloads
-
License
-
Repository
github
Last release
7 days ago

@prairielearn/aws-imds

Utilities for fetching data from the AWS EC2 Instance Metadata Service (IMDS).

Usage

import { fetchImdsText, fetchImdsJson } from '@prairielearn/aws-imds';

const hostname = await fetchImdsText('/latest/meta-data/hostname');
const identity = await fetchImdsJson('/latest/dynamic/instance-identity/document');

You can also use convenience functions to fetch data from common endpoints. The data is internally validated with Zod before being returned.

import { fetchInstanceHostname, fetchInstanceIdentity } from '@prairielearn/aws-imds';

const hostname = await fetchInstanceHostname();
const identity = await fetchInstanceIdentity();
2.0.0

7 days ago

1.0.16

2 months ago

1.0.15

2 months ago

1.0.14

3 months ago

1.0.13

4 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.9

7 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.10

7 months ago

1.0.2

11 months ago

1.0.1

12 months ago

1.0.0

1 year ago