Socket
Socket
Sign inDemoInstall

@aws-sdk/smithy-client

Package Overview
Dependencies
3
Maintainers
7
Versions
142
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/smithy-client


Version published
Weekly downloads
4M
decreased by-6.66%
Maintainers
7
Created
Weekly downloads
 

Package description

What is @aws-sdk/smithy-client?

@aws-sdk/smithy-client is a foundational package used in the AWS SDK for JavaScript. It provides the core client and command abstractions that are used to build service clients for AWS services. This package is part of the modular AWS SDK for JavaScript (v3), which allows developers to import only the specific AWS services they need.

What are @aws-sdk/smithy-client's main functionalities?

Client Creation

This feature allows you to create a custom client by extending the base Client class provided by the @aws-sdk/smithy-client package. This is useful for creating service-specific clients.

const { Client } = require('@aws-sdk/smithy-client');

class MyServiceClient extends Client {
  constructor(config) {
    super(config);
  }
}

const client = new MyServiceClient({ region: 'us-west-2' });

Command Creation

This feature allows you to create custom commands by extending the base Command class. Commands encapsulate the input and middleware logic for making API calls.

const { Command } = require('@aws-sdk/smithy-client');

class MyCommand extends Command {
  constructor(input) {
    super();
    this.input = input;
  }

  resolveMiddleware(clientStack, configuration, options) {
    // Middleware logic here
  }
}

const command = new MyCommand({ key: 'value' });

Middleware Stack

This feature allows you to create and manage a stack of middleware functions that can be used to modify the behavior of commands and clients. Middleware can be added at various stages of the request lifecycle.

const { MiddlewareStack } = require('@aws-sdk/smithy-client');

const stack = new MiddlewareStack();
stack.add((next, context) => async (args) => {
  console.log('Before request');
  const result = await next(args);
  console.log('After request');
  return result;
}, {
  step: 'initialize',
  name: 'loggingMiddleware',
});

Other packages similar to @aws-sdk/smithy-client

Changelog

Source

3.30.0 (2021-09-07)

Bug Fixes

  • client-s3: revert MRAP customizations (#2759) (cfb3fff)

Features

  • smithy-client: support strict timestamp parsing (#2737) (c244678)

Readme

Source

@aws-sdk/smithy-client

NPM version NPM downloads

An internal package

Usage

You probably shouldn't, at least directly.

FAQs

Last updated on 07 Sep 2021

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc