Fixes #32571 Implementing workaround from https://github.com/aws/aws-sdk-go-v2/issues/1816#issuecomment-1927281540