AWS Lambda Function URLs

The Before Times

Before Lambda Function URLs existed, if you wanted to expose your lambda to the public via the web, there were many options, but all of them were not free, and in fact, some could be quite expensive. Let's quickly review from most absurd to least absurd:

The New Hotness

Enter Lambda Function URLs. Now, you can expose your lambda directly to the internet with a dedicated URL with just a few clicks. Check a box and you can set up CORS so you can embed these calls directly into your web applications. The cost is rolled into the cost of Lambda, which means the free tier applies (1 million free requests and 400,000 GB-seconds free). No API gateway, no CloudFront, just a secure URL you can hit within seconds and execute your code. There is no faster way to get code running on the internet available in AWS (and among the fastest even outside of AWS).

Safe Proxies

One very good use case for this sort of thing is a proxy to an internal-only network. If you have a well-written, safe bit of code that only knows how to fire a webhook, or make an API call, with only safe tokens, instead of all the heavy lifting in exposing your private networks, you can use this to allow external tools to reach internal APIs without risking the security of the rest of the networking. AWS handles all the heavy lifting, and you just need a limited IAM role, and very simple and specific code to achieve your goal.