npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aws-lite/client

v0.22.4

Published

A simple, fast, extensible AWS client

Downloads

34,556

Readme

aws-lite is simple, extremely fast, extensible Node.js client for interacting with AWS services.

(It's got good error reporting, too.)

You can think of it as a community-driven alternative to AWS's JavaScript SDK.


Who made this?

aws-lite is developed and maintained by the folks at OpenJS Foundation Architect. We <3 AWS!

So, what is aws-lite?

aws-lite is a simple, extremely fast, extensible Node.js client for interacting with AWS services.

(It's got good error reporting, too.)

You can think of it as a community-driven alternative to AWS's JavaScript SDK.

Why not use aws-sdk / @aws-sdk/*?

Amazon has historically done a great job of maintaining its SDKs. However, AWS has deprecated its widely-adopted v2 SDK; its v3 SDK relies on generated code, resulting in large dependencies, poor performance, awkward semantics, difficult to understand documentation, and errors without usable stack traces.

We rely on and believe in AWS, so we built aws-lite to provide a simpler, faster, more stable position from which to work with AWS services in Node.js.

Features

  • 2-5x faster than AWS SDK v3
  • Simple semantics & straightforward promise-based interface
  • Human-readable documentation
  • Customizable
  • Errors with stack traces and line numbers
  • Built-in pagination
  • Secured with AWS Signature v4
  • Interacts with any AWS service without needing any plugins
  • Automatically parses / serializes JSON, AWS-flavored JSON, and XML request / response payloads
  • Easily integrates with local testing suites and AWS service mocks
  • Use existing service plugins, or develop your own
  • Debug mode for inspecting raw requests and responses
  • Just two dependencies

Install aws-lite

Install the client:

npm i @aws-lite/client

You can use the client as-is to quickly interact with AWS service APIs, or extend it with specific service plugins like so:

npm i @aws-lite/dynamodb

Generally, types are available as optional @aws-lite/*-types packages, and can be added like so:

npm i -D @aws-lite/dynamodb-types

Learn more about aws-lite types.

Example

Now start making calls to AWS:

// Instantiate a client with the DynamoDB plugin
import awsLite from '@aws-lite/client'
const aws = await awsLite({ region: 'us-west-1', plugins: [ import('@aws-lite/dynamodb') ] })

// Easily interact with the AWS services your application relies on
await aws.DynamoDB.PutItem({
  TableName: '$table-name',
  Item: {
    // AWS-lite automatically de/serializes DynamoDB JSON
    pk: '$item-key',
    data: {
      ok: true,
      hi: 'friends'
    }
  }
})

await aws.DynamoDB.GetItem({
  TableName: '$table-name',
  Key: { pk: '$item-key' }
})
// {
//   Item: {
//     pk: '$item-key',
//     data: data: {
//       ok: true,
//       hi: 'friends'
//     }
//   }
// }

// Use the lower-level client to fire a GET request by specifying a `service` and `endpoint`
await aws({
  service: 'lambda',
  endpoint: '/2015-03-31/functions/$function-name/configuration',
})
// {
//   FunctionName: '$function-name',
//   Runtime: 'nodejs20.x',
//   ...
// }

// POST JSON by adding a `payload` property
await aws({
  service: 'lambda',
  endpoint: '/2015-03-31/functions/$function-name/invocations',
  payload: { ok: true },
})

Learn more

Client configuration

Credential and general configuration options for aws-lite

Requests / responses

Using aws-lite to make requests and receiving responses

Using TypeScript

Guide and examples for using TypeScript with aws-lite

Plugin API

Docs and examples for the aws-lite plugin API

Performance

Open, reproducible, real-world metrics for the performance of aws-lite and other AWS SDKs

Contributing

Open source contributor guidelines, methodology, and instructions

List of official @aws-lite/* plugins