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

@aws-lite/client

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-lite/client

A simple, fast, extensible AWS client

  • 0.16.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source
aws-lite

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.

GitHub CI status npm version Apache-2.0 License


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
 * This is an asynchronous operation that will attempt to load your AWS credentials, local configuration, region settings, etc.
 */
import awsLite from '@aws-lite/client'
const config = { region: 'us-west-1' } // Optional
const aws = await awsLite(config)

/**
 * Reads
 * Fire a GET request to the Lambda API by specifying its AWS service name and API path
 */
await aws({
  service: 'lambda',
  path: '/2015-03-31/functions/$function-name/configuration',
})
// {
//   FunctionName: '$function-name',
//   Runtime: 'nodejs20.x',
//   ...
// }

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

/**
 * Plugins
 * Use service plugins to more easily interact with the AWS services your application relies on
 */
await aws.DynamoDB.GetItem({
  pk: '$item-key',
})
// {
//   Item: {
//     pk: '$item-key',
//     data: 'item-data',
//     ...
//   }
// }

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

FAQs

Package last updated on 05 Feb 2024

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