Hello, i use amplify storage to push my data on S3.
With small data it works fine. But with a data with 50Mb, after uploading, i got an error in the console an error Code d’état : 504. and when i check the request response I have message "Endpoint request timed out"
I found in Github same issue : https://github.com/aws-amplify/amplify-js/issues/7574
When i check my identity pool, I can't add s3:CreateMultipartUpload . It is not available in S3 iam policies options.
Aws premium support said this:
As agreed, I took this offline and I tried to replicated the issue on my environment using react. However, I could not reproduce the issue and the uploads (~1GB) worked as expected and I had the same cognito permission and configurations as in your application. Therefore, I do not think there is any issues with your configuration.
That being said, can you kindly perform the following and share your observations.
- Increase HTTP timeout to a larger value as we are getting 504 errors: AWS.config.s3 = { httpOptions: { timeout: 120000 } };
- Upgrade the amplify version to atleast version 5. I noted that you are using an older version of amplify 4.3.14.
I don't find where to put the timeout option in my js code
resumable: true,
completeCallback: (event) => {
//Activate all buttons blocked
},
progressCallback: (progress) => {
const value = (progress.loaded * 100) / progress.total;
this.uploadProgress = Math.round(value);
},
errorCallback: (err) => {
this.isSubmitButtonClicked = false;
}
});```
Please how could I do.
Thank you