I'd like to setup the most correct and lowest latency infrastructure for AWS
.
I would like to serve static Javascript
files over CloudFront
, and on top of that - a call to a dynamic server that will return an invocation to a Javascript
function that was declared before by the files served by the CloudFront
- I found that this is the most optimal way to do that.
However, the dynamic call is dependant on a certain database (will probably end up being DynamoDB
) that I want dispersed and replicated over many regions to decrease latency as much as possible.
My idea was having Lambda
functions spread in multiple regions around the world retrieving data from DynamoDB
replicas in their corresponding region in order to serve the dynamic parameters for the JS functions (Is there a way to make the Lambda
functions not dependant and having the DynamoDB
endpoint hard-coded in the code ?).
In addition to all of that, I'd like broad monitoring over every request made, is CloudWatch
the best approach for that or should I store it directly in a MySQL Aurora
database or DynamoDB
of some sort ? What will be the best choice for monitoring purposes ?
Is that the best infrastructure possible for multi-million user based system, multi-regional, lowest possible latency and most scalable way ?