If you use AWS SDK v2, it for some reason hides stack trace from you.
Here is the workaround you can try:
yourCallWithAwsSdkV2().promise().catch(reThrow);
function reThrow(error: any): never {
const better: any = new Error(error.message);
better.code = error.code;
throw better;
}