Is this only problem with AWS SDK calls? Eg. what version of AWS SDK do you use? V2 or V3?
I remember there were some issues with V2 and errors so just to make sure this is not related to this.
Would you mind to tey to theow an error in the beginning of your handler to see if you can see the line number in the error stack?