The problem is described in issue #10988 on the LocalStack Github page.
Run the test in the LocalStackIssueReproductionTest.java
class.
The test should fail with:
org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 10,000,000; received: 9,502,720)