I'm using AWS JavaScript SDK in a Cordova application on Android and have set the configuration as below
AWS.config = new AWS.Config({
region: Constants.region,
httpOptions: {
timeout: 1200000 //20 mins
}
});
I'm able to upload images and text files of > 2MB size without issues. But the code always fails to upload video files of any size. Below are the error logs I'm getting
PUT https://s3.ap-south-1.amazonaws.com/my-s3-bucket/files/VID-20170127-WA0017.mp4 net::ERR_CONNECTION_RESET
PUT https://s3.ap-south-1.amazonaws.com/my-s3-bucket/files/VID-20170127-WA0017.mp4 net::ERR_CONNECTION_RESET
PUT https://s3.ap-south-1.amazonaws.com/my-s3-bucket/files/VID-20170127-WA0017.mp4 net::ERR_CONNECTION_RESET
PUT https://s3.ap-south-1.amazonaws.com/my-s3-bucket/files/VID-20170127-WA0017.mp4 net::ERR_CONNECTION_RESET
It seems that the connection is reset after about 45-50 seconds inspite of the 20 min. timeout configuration