typebridge
typebridge copied to clipboard
chore: standardize the aws-sdk v2 module import syntax
Resolves #16
Hi @fredericbarthelet ! As you mentioned, this PR will not affect lambdas cold start duration nor have any impact on performance. Its purpose is to spread awareness about the aws-sdk v2's unexpected behavior on imports.
To anyone wondering: when using the v2 of aws-sdk, one should not use imports at the root (e.g. import {EventBridge} from 'aws-sdk' but rather import EventBridge from 'aws-sdk/clients/eventbridge' ), as it does not perform tree-shaking and will therefore increase your bundle size by a lot.