aws-sdk-js-codemod icon indicating copy to clipboard operation
aws-sdk-js-codemod copied to clipboard

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

Open trivikr opened this issue 4 months ago • 0 comments

Self-service

  • [ ] I'd be willing to implement this feature

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

trivikr avatar Feb 27 '24 21:02 trivikr