title: Deploying my front end and detecting client location by IP address - which AWS service should handle this? Confused by my options
body: <p>I'm still new to AWS and just following the documentation and asking questions here when I get stuck.  Please excuse me if this question sounds really noobish.</p>
  
  <p>So far, I've deployed the following:</p>
  
  <ol>
  <li><p>EB to deploy my REST API</p></li>
  <li><p>RDS to deploy my psql database</p></li>
  <li><p>Lambda functions to handle things like authentication &amp; sending JWTs, uploading images to S3, etc.</p></li>
  </ol>
  
  <p>I have got my basic back end (no caching (just started learning about redis), etc. set up yet, just the bare bones so far) deployed.  </p>
  
  <p>I'm still developing my front end, and have not even thought about how I will be deploying it yet (probably another deployment on EB, since I am using universal react).  I am just developing it locally but using my production env variables now so I am hitting my deployed API, etc. </p>
  
  <p><strong>One of the MAJOR things I have no idea on how to do is detecting incoming requests from client side to get the client's location by IP address.  This is so that I can return the INITIAL results in your general location just like yelp, foursquare, etc. do when you go to to their sites.</strong></p>
  
  <p>For now, I am just building a web app on desktop so I just want to worry about getting the IP address to get the general area of the user.  My use case is something similar to other sites you might have used which provides an INITIAL result set for things in your area (think foursquare or yelp).</p>
  
  <p>Here are my questions:</p>
  
  <ol>
  <li><p>What would be a good way to do this?  I'm thinking of handling this in my front end react universal deployment since it will be a node server with rendered page caching.  Is this a terrible idea?  It would work something like </p>
  
  <p>(1) request from client comes in</p>
  
  <p>(2) get IP from request and lookup the IP location using some service (still not sure what I'm going to use, have found a few plus a nodejs library called node-geoip).  Preferably, I can get the zip code since I am trying to save having to do so many queries by unique locations in my database, and instead return results in the zip code and the front end will show an initial map with the initial results in that zip code.</p>
  
  <p>(3) return to client the rendered page with those location params if it exists, otherwise create it, send it, and cache it.</p></li>
  <li><p>Is the above a really dumb idea?  Maybe you have already done something like this, and could share your wisdom :)</p></li>
  <li><p>Is there an AWS service which can already handle something like this for me?  Perhaps there's some functionality which can already do this.</p></li>
  </ol>
  
  <p>Thanks.  </p>
  
  <p>AGAIN - I apologize if this is long winded.  I don't know anyone in real life who can help me and I feel alone :(.  I appreciate the help you guys can provide.</p>