from Hacker News

AWS Lambda function URLs: Built-in HTTPS endpoints

by vvoyer on 4/6/22, 9:07 PM with 173 comments

  • by petercooper on 4/6/22, 9:51 PM

    Very pleased by this addition! :-) Note that it creates special .on.aws URLs so if you want to use your own domain to future proof the endpoint (against linkrot if you ever leave AWS, say) you'll want to set up a redirect/proxy for yourself (whereas API Gateway does custom domains).

    Also an interesting note from the docs about how said URL is generated: "Because this process is deterministic, it may be possible for anyone to retrieve your account ID from the <url-id>." I don't know how much of a problem this could be, but it's worth being aware of.

  • by laurencerowe on 4/7/22, 1:43 AM

    It's super frustrating that AWS has no equivalent to GCP's Cloud Run which offers fast startup, scales to zero but offers the flexibility and simply exposing HTTP to the container it runs.

    Lambda has scale to zero and fast startup but its custom RPC interface (presumably an outgrowth of its batch processing origins) does not support streaming responses, has awkward response size limits, and prevents multiple requests from being executed concurrently on the same instance (so caches cannot be shared.)

    Fargate provides the flexibility from simply running an HTTP server inside a container but at the cost of slower startup and no ability to scale to zero.

  • by brentmitchell25 on 4/6/22, 11:56 PM

    My previous company had thousands of lambda functions and api gateway integrations and near impossible to do anything with confidence when you starting integrating with all the other cloud offerings. My current environment is similar scale, but all containers it's night and day difference when it comes to confidence. We can move 100x faster when you can reproduce environments locally or separate account in seconds or minutes with everything baked in. I don't think I could move back, but hey at least this might eliminate a few API Gateway integrations.
  • by rmbyrro on 4/6/22, 9:24 PM

    Amazing, now I don't have to pay API Gateway to do just an HTTP routing.
  • by azth on 4/6/22, 9:22 PM

    Can anyone using lambda at scale pitch in regarding costs? It seems companies are using it to build pipelines which could be much cheaper by writing full services as opposed to small functions that you pay for per invocation.
  • by epolanski on 4/6/22, 10:24 PM

    I'm confused, the whole news is that you can directly call lambdas without having to go through API gateway, like you do on cloudflare?
  • by tealpod on 4/7/22, 12:55 PM

    Today we are coincidentally releasing the beta for https://tinyfunction.com/ TinyFunction is the simplest NodeJS and Python function deployer. All functions are deployed in AWS.
  • by euph0ria on 4/6/22, 9:51 PM

    Is it possible to front this with your own domain using a CNAME or are the function URLs dynamically genrerated on each commit/upload/build?
  • by wnevets on 4/6/22, 9:29 PM

    finally. Having to setup a gateway is so cumbersome.
  • by pojzon on 4/6/22, 10:32 PM

    Are those function urls backed by WAF and AWS Shield ?

    If not -> get prepared for huge bill of ddosed function invocations.

    I hope we can at least attach something to those urls.

  • by lysecret on 4/7/22, 7:39 AM

    Really Cool addition. I just moved my lambdas from API Gateway to ALB (because of API G limit to 30s). I also use Serverless framework. It was a day of work, but developing with ALB is a bit more of pain. Maybe this would be better. Are there any timeout or mb constraints on these URLs?
  • by dsanchez97 on 4/7/22, 12:03 AM

    If you are using Python and looking for a framework to quickly get your Aws Lambda Functions up and running, try out the framework I am developing. It is still in the early stages, but it has some optimizations that make it simple to do things like use 3rd party packages. If you are interested, a good place to start are the docs on how to connect functions to Api Gateway https://staging.cdevframework.io/docs/examples/httpendpoints....

    If you want the developer experience of Django with the benefits of Serverless Compute platforms check it out!

  • by AndrewDucker on 4/7/22, 6:47 AM

    I wish that Azure Functions had this.

    I have a function triggered by Cron once a day that goes wrong about once a month. I trigger it again using the debugging tools, but it would be nice if I could just hit a URL to trigger it again.

  • by oneupwallstreet on 4/7/22, 2:29 AM

    This is fantastic, I'm making an iOS application that is 100% serverless. Having no servers feels great but managing API Gateway endpoints is annoying. I don't know about performance but Google Cloud Functions definitely had an edge there, because I believe they had native function endpoints since launch.

    I wonder if it's worth changing my current API Gateway endpoints to the built in Lambda URL's, since I haven't launched yet.

  • by miyuru on 4/7/22, 7:19 AM

    Although it doesn't mention in the blog post, the HTTPS endpoints are dual-stacked.

    Seems like AWS is actually launching new endpoints with IPv6 support by default now.

  • by ep103 on 4/7/22, 6:08 AM

    So its a public https endpoint, with no built in throttling? This... doesn't seem like a ddos vulnerability to anyone? All it would take is one script kiddie to rack up an unsuspectingly large aws bill, no?
  • by nl on 4/6/22, 9:58 PM

    How is it that my UX looks completely different to the blog post?

    I don't have advanced settings. Instead I have to go "Configuration->Function URL" to find this.

  • by notyourday on 4/7/22, 6:15 PM

    Where are at least ACL and green header filtering?! This is 2022. If this is not supported at the entry point the product should be sent back to design.
  • by paxys on 4/7/22, 1:27 AM

    Nice! Of course this has always been possible to do, but removing the API Gateway dependency will make simple use cases a lot simpler.
  • by cobertos on 4/6/22, 10:08 PM

    Now if only you could add an EIP to a lambda function without a VPC NAT and the $20/mo minimum that comes with it.
  • by daenz on 4/6/22, 11:03 PM

    Very happy to hear it has first-class alias support. Now if only they would allow per-alias environment variables...
  • by anshumankmr on 4/7/22, 3:48 AM

    For someone who has only worked with Cloud Functions on GCP, can someone explain to me how is this different?
  • by ankit70 on 4/6/22, 9:48 PM

    How is it different than cloudflare workers?
  • by supahfly_remix on 4/6/22, 10:07 PM

    Is this similar to a cgi-bin script?
  • by zozbot234 on 4/6/22, 10:06 PM

    AWS Lambda has now gone full PHP. Never go full PHP.