3 ms·
What would you propose? Yet another AWS service for the specific use case?
by turtlebits 5y ago
What would you propose? Yet another AWS service for the specific use case?
- hamandcheese 5y agoConfig of some sort maybe? If you can do it in nginx, seems like it should be possible without invoking a lambda.
- njitbew 5y 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 5y 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 5y 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.
- luhn 5y agoCloudFront should let you configure header injection for responses. Just a simple list of key-value pairs. I've seen it requested before, it's a feature a lot of people want.