Modularized package structure
main@aws-sdk/client-lambda instead of aws-sdk/clients/lambda). This allows for smaller bundle sizes by only importing the specific service clients and core logic required for your application.repository·main·Indexed 25 days ago
https://github.com/aws/aws-sdk-js-v3A modularized rewrite of the AWS SDK for JavaScript v2, designed for improved performance, smaller bundle sizes via tree-shaking, and first-class TypeScript support. It utilizes a command-based pattern and a middleware stack for request lifecycle management. The SDK provides modular clients, such as AmplifyClient, AmplifyUIBuilderClient, and ApiGatewayV2Client, as well as aggregated client classes for a development experience similar to v2.
@aws-sdk/client-lambda instead of aws-sdk/clients/lambda). This allows for smaller bundle sizes by only importing the specific service clients and core logic required for your application.@aws-sdk/client-emr-serverless package provides the client commands necessary to interact with Amazon EMR Serverless. You can use this client to manage applications, execute job runs, manage sessions, and handle resource tagging.Install the BCMPricingCalculator client using your preferred package manager:
npm install @aws-sdk/client-bcm-pricing-calculator
yarn add @aws-sdk/client-bcm-pricing-calculator
pnpm add @aws-sdk/client-bcm-pricing-calculatorInstall the BCMRecommendedActions client package using your preferred package manager.
npm install @aws-sdk/client-bcm-recommended-actions
yarn add @aws-sdk/client-bcm-recommended-actions
pnpm add @aws-sdk/client-bcm-recommended-actionsInstall the Amazon CloudWatch Application Insights client using your preferred package manager:
npm install @aws-sdk/client-application-insights
yarn add @aws-sdk/client-application-insights
pnpm add @aws-sdk/client-application-insightsThe recommended way to use the SDK is the modular pattern. Import the ObservabilityAdminClient and specific command classes (e.g., ListResourceTelemetryCommand) to keep your bundle size small. You instantiate the client with configuration like region, create a command with input parameters, and then use client.send(command) to execute the request.
import { ObservabilityAdminClient, ListResourceTelemetryCommand } from "@aws-sdk/client-observabilityadmin";
const client = new ObservabilityAdminClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListResourceTelemetryCommand(params);
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}Install the Amazon EC2 Auto Scaling client using your preferred package manager.
npm install @aws-sdk/client-auto-scaling
yarn add @aws-sdk/client-auto-scaling
pnpm add @aws-sdk/client-auto-scalingInstall the Amazon Connect Campaigns V2 client using your preferred package manager.
npm install @aws-sdk/client-connectcampaignsv2
# or
yarn add @aws-sdk/client-connectcampaignsv2
# or
pnpm add @aws-sdk/client-connectcampaignsv2Install the CodePipeline client package using your preferred package manager:
npm install @aws-sdk/client-codepipeline
yarn add @aws-sdk/client-codepipeline
pnpm add @aws-sdk/client-codepipelineThe AWS SDK is modularized. You should import the CustomerProfilesClient and only the specific command objects you need (e.g., ListDomainsCommand) to keep your bundle size small.
// ES6+ example
import { CustomerProfilesClient, ListDomainsCommand } from "@aws-sdk/client-customer-profiles";Install the MigrationHubOrchestrator client package using your preferred package manager:
npm install @aws-sdk/client-migrationhuborchestrator
yarn add @aws-sdk/client-migrationhuborchestrator
pnpm add @aws-sdk/client-migrationhuborchestratorInstall the Kendra Ranking client using your preferred package manager.
npm install @aws-sdk/client-kendra-ranking
yarn add @aws-sdk/client-kendra-ranking
pnpm add @aws-sdk/client-kendra-ranking