Context: aws-sdk v2 uses cjs and thus does not tree shake. This means that the following syntax:
import type { EventBridge } from 'aws-sdk'; will result in importing aws-sdk package in its entirety, rather than just EventBridge type.
Note that this is fixed in aws-sdk v3.
Impact: Increasing cold starts for lambdas (up to +1.3s on cold start duration).
How? For instance, a lambda uses this package (v0.7) when sending an event to EventBridge.
Proposed fix: In versions < 1, adopt the following import syntax:
import type EventBridge from 'aws-sdk/EventBridge';
Thanks:)