I think a more appropriate way to do this is

import { <ServiceName> } from 'aws-sdk';

for instance

import { DynamoDB } from 'aws-sdk';

followed by

this.client = new DynamoDB(); in the class.

I say it is more appropriate because it uses TypeScript's import syntax.

Also, there's a clear explanation - by AWS - on how to use TS with AWS SDK here.

Answer from Michael Pell on Stack Overflow
🌐
npm
npmjs.com › package › @aws-sdk › types
aws-sdk/types
March 13, 2026 - Types for the AWS SDK. Latest version: 3.973.6, last published: 3 days ago. Start using @aws-sdk/types in your project by running `npm i @aws-sdk/types`. There are 1467 other projects in the npm registry using @aws-sdk/types.
      » npm install @aws-sdk/types
    
Published   Mar 13, 2026
Version   3.973.6
Author   AWS SDK for JavaScript Team
🌐
npm
npmjs.com › package › @types › aws-sdk
types/aws-sdk
October 23, 2024 - Stub TypeScript definitions entry for aws-sdk, which provides its own types definitions. Latest version: 2.7.4, last published: a year ago. Start using @types/aws-sdk in your project by running `npm i @types/aws-sdk`. There are 151 other projects in the npm registry using @types/aws-sdk.
      » npm install @types/aws-sdk
    
Published   Oct 23, 2024
Version   2.7.4
Discussions

How do I use AWS sdk definitions for TypeScript?
TIP: always a good idea to see the test file for intended usage : https://github.com/borisyankov/DefinitelyTyped/blob/master/aws-sdk/aws-sdk-tests.ts ... Thanks, that is really helpful and it did solve my immediate problem, but now I'm stuck trying to use the actual type definitions. More on stackoverflow.com
🌐 stackoverflow.com
Dealing with non-existent types in the aws-sdk for JS v3
For now, my plan is just to add some TODOs to my codebase to take a look back at these and open an issue with `aws-sdk-js-v3` More on reddit.com
🌐 r/aws
3
4
July 18, 2023
aws sdk - converting types from aws sdk v2 to v3 (typescript) - Stack Overflow
I am migrating a typescript codebase from aws sdk v2 to v3. In my code I have used several types from aws sdk v2 as follows: import * as AWS from 'aws-sdk'; export async function uploadFn( s3: AW... More on stackoverflow.com
🌐 stackoverflow.com
Node.js SDK TypeScript
Found my answer, use aws-lambda package for handler types. Check the 2nd link in the topics section AWS Typescript docs More on reddit.com
🌐 r/aws
1
3
April 5, 2024
🌐
Amazon Web Services
aws.amazon.com › developer center › tool to build on aws › aws sdk for javascript
AWS SDK for JavaScript
3 days ago - The AWS SDK for JavaScript is written in TypeScript. Its first-class static type definitions are self-documenting and speeds up readability, debugging and refactoring. The type definitions also help detect 15-38% of the bugs in the application code.
🌐
Go Packages
pkg.go.dev › github.com › aws › aws-sdk-go-v2 › service › s3 › types
types package - github.com/aws/aws-sdk-go-v2/service/s3/types - Go Packages
type AnalyticsFilter interface { // contains filtered or unexported methods } The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any ...
🌐
Reddit
reddit.com › r/aws › dealing with non-existent types in the aws-sdk for js v3
r/aws on Reddit: Dealing with non-existent types in the aws-sdk for JS v3
July 18, 2023 -

tl;dt I'm migrating code over to the recommended v3 aws-sdk for JS and there are some types that no longer exist in the model-generated @aws-sdk/client-<SERVICE> code

I'm migrating my project's code over to the recommended v3 aws-sdk for JS and there are some types (my project uses TS) that no longer exist in the model-generated @aws-sdk/client-<SERVICE> code. According to the official aws-sdk-js-v3 repo:

The v3 codebase is generated from internal AWS models that AWS services expose. We use smithy-typescript to generate all code in the /clients subdirectory. These packages always have a prefix of @aws-sdk/client-XXXX and are one-to-one with AWS services and service operations.

I've heard some frustration with the auto-generated code from coworkers, but this is the first time I've seen instances of the new v3 SDK differing from v2. We had previously been using types like:

import { StackName } from 'aws-sdk/clients/cloudformation';

which wasn't really an issue because it's just a string, but there are one's that get a bit trickier like:

import { RuleResponseList } from 'aws-sdk/clients/eventbridge';

which is itself an Array of Rules which are fairly complex and that I really do not want to type myself.

The v3 migration opts to completely remove imports from aws-sdk/* so I'm a bit stuck... is this an oversight and just something that needs to be brought to the AWS team's attention or am I missing how to import these types in v3?

Edit: a word & formatting

Find elsewhere
🌐
DataFlair
data-flair.training › blogs › aws-sdk
AWS SDK Tutorial - Types of SDK's & Developer Tools - DataFlair
September 1, 2018 - What is AWS SDK-Types of SDK, AWS Developer Tools, AWS CodeDeploy, AWS CodeBuild, AWS CodePipeline, AWS CodeCommit, AWS Java SDK, AWS PHP SDK, AWS SDK Ruby,
🌐
Medium
medium.com › @claude.ducharme › 3-aws-sdk-for-javascript-v3-examples-using-typescript-c1e1ab209ec6
3 AWS SDK for JavaScript v3 examples using TypeScript | by Claude Ducharme | Medium
August 1, 2022 - It is often challenging to find good TypeScript examples using correct types instead of “any”. This article is my attempt to remediate the situation, a far better option than defaulting to v2 due to the lack of documentation/samples. For the code gists below, simply replace process.env.* variable values with yours to get them working. Gists were tested using version 3.131.0 of the @aws-sdk
🌐
Amazon Web Services
docs.aws.amazon.com › cli › latest › reference › apigateway › get-sdk-types.html
get-sdk-types — AWS CLI 2.33.11 Command Reference
First time using the AWS CLI? See the User Guide for help getting started. ... get-sdk-types is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the --no-paginate argument.
🌐
AWS
aws.amazon.com › blogs › developer › first-class-typescript-support-in-modular-aws-sdk-for-javascript
First-class TypeScript support in modular AWS SDK for JavaScript | AWS Developer Tools Blog
July 27, 2021 - It specifies that region is optional, its value can be a string or a Provider<string>, and it stores the AWS region to which the client will send requests. ... Although we highly recommend our customers to use TypeScript in their code, it’s optional. The Intellisense features will work even if you’re writing your code in JavaScript. The code in the screenshot is JavaScript code. As maintainers of the SDK, we get to use the latest and greatest features of the ECMAScript specification supported by TypeScript but still target the published artifacts to use the version supported by runtime.
🌐
Reddit
reddit.com › r/aws › node.js sdk typescript
r/aws on Reddit: Node.js SDK TypeScript
April 5, 2024 -

I am tasked with refactoring a node 12 typescript lambda service. I have bumped versions of node up to node 18 and am working to upgrade from aws-sdk v1 to v3. I am a little bit stuck, i've started installing aws packages like @aws-sdk/client-lambda and @aws-sdk/types. I can't find a definite answer to whether or not I still need @types/aws-lambda though, I haven't been able to find anything that say whether the lambda handler types for sns and sqs exist in @aws-sdk/types. I have very little experience with node and typescript and my team is short staffed so the DevOps guy(me) who usually handles my infrastructure, pipeline and deployment stuff is tasked with this. Any help, advice, links to good detailed docs would be appreciated. TYIA.

EDIT: I thought that because aws-sdk has the /types package I would use that for handler types. Seems that we should use the aws-lambda package for the handler types for typescript. I found it in this example from the second link in the topics section https://docs.aws.amazon.com/lambda/latest/dg/lambda-typescript.html

🌐
jsDelivr
jsdelivr.com › package › npm › @aws-sdk › types
aws-sdk/types - A CDN for npm and GitHub
January 22, 2026 - A free, fast, and reliable CDN for @aws-sdk/types. Types for the AWS SDK
Published   Nov 19, 2018
🌐
GitHub
github.com › aws › aws-sdk-js-v3 › issues › 5955
@aws-sdk/types version · Issue #5955 · aws/aws-sdk-js-v3
April 2, 2024 - @aws-sdk/types@3.535.0 · Node.js · v18.13.0 · -- -- -- No response · No response · Reactions are currently unavailable · No one assigned ·
Author   patrick-geyer-21