News for hackers. Stuff that matters.
Re:AWS Lambda Edge changes duration billing granularity from... by turtlebits on Friday April 09, 2021 @04:12PM (#26755492)
What would you propose? Yet another AWS service for the specific use case?
Re:AWS Lambda Edge changes duration billing granularity from... by luhn on Friday April 09, 2021 @06:15PM (#26756860)
CloudFront 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.
Re:AWS Lambda Edge changes duration billing granularity from... by hamandcheese on Friday April 09, 2021 @04:18PM (#26755559)
Config of some sort maybe? If you can do it in nginx, seems like it should be possible without invoking a lambda.
Re:AWS Lambda Edge changes duration billing granularity from... by njitbew on Friday April 09, 2021 @04:47PM (#26755939)
I 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.

Re:AWS Lambda Edge changes duration billing granularity from... by jfrunyon on Friday April 09, 2021 @05:17PM (#26756295)
> 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

Re:AWS Lambda Edge changes duration billing granularity from... by TheCoelacanth on Friday April 09, 2021 @05:33PM (#26756483)
If 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.