5 ms·
Config of some sort maybe? If you can do it in nginx, seems like it should be possible without invoking a lambda.
by hamandcheese 6y ago
Config of some sort maybe? If you can do it in nginx, seems like it should be possible without invoking a lambda.
- njitbew 6y agoI don't understand what nginx has to do with this. nginx's language is just that: a language. If Lambda@Edge would support nginx language, you would still be invoking a lambda. But I'd must rather write some header rewriting code in, say, JavaScript than nginx's language. Then why a (Turing-complete) programming language and not a config language? Simple: because a programming language gives you infinite more power than what any config system could ever provide. E.g. I could compare the origin IP, determine the country, and change the response based on that. And there are plenty of use cases like this which you cannot express in a config language.
- jfrunyon 6y ago> E.g. I could compare the origin IP, determine the country, and change the response based on that. And there are plenty of use cases like this which you cannot express in a config language. Well, you can do that in plenty of "config languages", including nginx[1]. The reason Lambda exists is that it's good for Amazon, because they can push all the costs of the logic back onto the customer. (It could also be good for the customer, in that whatever configuration Amazon might otherwise support could be limited.) [1] http://nginx.org/en/docs/http/ngx_http_geoip_module.html http://nginx.org/en/docs/http/ngx_http_geoip_module.html
- TheCoelacanth 6y agoIf you want a full-fledged reverse proxy, then you can run a full-fledged reverse proxy. Cloudfront is a CDN, it's not intended to be a replacement for nginx.