Skip to content

[Feature]: Transform deep import of DocumentClient #799

Open
@trivikr

Description

@trivikr

Self-service

  • I'd be willing to implement this feature

Problem

Transformation is not done for the following code:

import { DocumentClient } from 'aws-sdk/lib/dynamodb/document_client';

const client = new DocumentClient();

Solution

Transformed code

import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
import { DynamoDB } from '@aws-sdk/client-dynamodb';

const client = DynamoDBDocument.from(new DynamoDB());

Alternatives

Skip the transformation, as deep import from aws-sdk/lib/* is not documented in public.
The official documented deep import is aws-sdk/clients/*

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions