I've recently began a project which will require data storage of points on a map in the form of coordinates. So I plan on storing Latitude and Longitude per point. I'm trying to figure out what the best AWS data storage service to use with this might be.
Primarily what I'll need to do is be able to query points within a certain area. So the vast majority of my queries will look something like this:
SELECT * FROM Point WHERE Point.Latitude < 40.0072 AND Point.Latitude > 39.9927 AND Point.Longitude < 40.0072 AND Point.Longitude > 39.9927
Potentially the database could have millions or maybe even billions of points on it with possibly up to a few hundred within a square mile. So scalability is very important. So I was thinking DynamoDB may be a good choice. However, it is my understanding that DynamoDB only allows you to query on the primary key which the Latitude and Longitude would never be. It seems like the limits of DynamoDB would not allow me to easily query data according to the requirements.
So given these requirements, what would be a good or the best option between services such as DynamoDB, RDS, and ElasticSearch?