aws / aws-sdk-js-codemod

Codemod scripts to update AWS SDK for JavaScript APIs.
MIT No Attribution
73 stars 10 forks source link

[Feature]: Transform client created from constructors derived from destructuring assignment #784

Open trivikr opened 8 months ago

trivikr commented 8 months ago

Self-service

Problem

import AWS from "aws-sdk";
const { DynamoDB } = AWS;
const client = new DynamoDB();

Solution

import { DynamoDB } from "@aws-sdk/client-dynamodb";
const client = new DynamoDB();

Alternatives

N/A

Additional context

Noted when working on utility https://github.com/aws/aws-sdk-js-codemod/pull/781