504 Gateway timeout from S3

We are using uppy in our application to support our users’ need to upload large files to S3. We also let them upload many files (>500 in number sometimes). After implementing uppy, we find that our users are getting 504 gateway timeout from S3.

The requests that fail are of this type (some parts of the request are hidden):

https://BUCKETNAME.amazonaws.com/395775f3-d9dc-4841-bb6f-93746ed43bdd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxx%2F2Faws4_request&X-Amz-Date=20220211T002156Z&X-Amz-Expires=900&X-Amz-Signature=e0115e52693151daaae53468552922c749c0f974e9f6ddddc9d54174ea848e40&X-Amz-SignedHeaders=host&partNumber=68&uploadId=8tnnv7JdK8XPJHLh6U0anqOQ4CSf30UNrSb.x7k60N9nE8XXQ6x5d7O4Sf5Z1Jje0YX3qC_lKc7OxY0.CjcutM0I0fGpxI3XNoyRSmtIjLOX_s2OdCw14TO8cDnvd6rf

Have you faced this issue before? Any recommendations to prevent this?

We are also unable to extract the request id to give to AWS support. The request id is embedded deep in uppy code. Is there a way to extract the S3 request ids that can be given to AWS support?

Thanks