I'm writing a mobile app that communicates with my server using REST. Upon every launch, the app makes a call to the server api to check whether there was a change in the user details (using a
lastUpdate parameter), the api returns the updated user object in case there was a change.
The drawback to this approach of course, is that every launch of the app causes an api call (and an SQL query) to my server.
I had an idea to use HTTP
ETAG\last-modified header and store the user details as a json file in S3 bucket (+ S3 access control). That way, the app can check against that file (instead of a direct call to the api). I will save lots of connections to my server and lots of db queries as well.
It seems like a legit solution, though somehow I get the feeling that storing all my users data in files on S3, is not secure..
What do you think?