We use angular for our front end, our compiled dist folder is uploaded to an S3 bucket which is connected to a load balancer. In order for our site to be rendered correctly for search engine bots we implemented Angular Universal which is running on an ec2-instance. The question is among all AWS service which one can we use to detect bot(or even allow a script that does) and redirect to the ec2-instance. Or is there any alternative approach this can take? I am currently looking into cloudfront and lamba.
Looking at duckduckgo.com?q=example one can observe the following;
<noscript> <meta http-equiv="refresh" content="0;URL=/html?q=example"> </noscript>
Checking the user agent is another solution (example).