Troubleshoot Spring Boot Java and ReactJs Project

Job ID: 32563753

Budget: $30 – $250 USD

I have a React JS project which on click of a button downloads a .json file generated by Spring Boot Jar. The problem is when I run both the application on localhost I can instantly download 70-100 mb of file in ms, but when I deploy the Jar on Amazon EC2 and connect my localhost react app to the instance on that port and IP, I face very very slow speed in downloading via browser say in 10 minutes it just downloads 10-12 mb of file. How to solve this?
Related categories: Node.js React.js Apache Maven Aws Lambda Spring Boot