AWS Introduces Lambda Function URLs to Simplify Serverless Deployments





AWS recently announced the general availability of Lambda Function URLs, a feature that allows developers to directly configure an HTTPS endpoint and CORS headers for a Lambda function without providing other services.

With the new feature, developers no longer need to rely on the Amazon API Gateway or the Application Load Balancer to map a Lambda function to an HTTP call. Each function URL is globally unique and can be associated with a function’s alias or the function’s ARN, implicitly calling the latest version. Alex Casalboni, lead developer of AWS, explains the scenarios where the new feature helps:

Function URLs are best for use cases where you need to deploy a single-function microservice with a public endpoint that doesn’t require the advanced functionality of API Gateway, such as request validation, throttling, custom authorizations, custom domain names, usage plans, or caching. For example, when you implement webhook handlers, form validators, mobile payment processing, ad placement, machine learning inference, etc.

Looking at the announcement, AJ Stuyvenbergserverless engineering lead at Datadog, adds:

They are useful in a number of key cases: Mono-Lambda APIs, Service to Service communications, and lightweight webhooks. I think with a few iterations, function URLs could get much better – and may be the default integration mechanism for HTTP based Lambda call.

Source: https://aws.amazon.com/blogs/aws/announcing-aws-lambda-function-urls-built-in-https-endpoints-for-single-function-microservices/

The announcement sparked a lot of backlash on Hacker News and Reddit, with some users appreciating the simplicity of the solution and others lacking support for custom domains or highlighting limited authorization options. Ebi Mirsafian, senior infrastructure engineer at XING, thinks Lambda URLs are a “big factor towards 100% serverless,” while Paul Zichsman, technical director at cloudandthings.io, says:

I’m having a hard time seeing why this exists, especially without an authorizer.

Amazon isn’t the only cloud provider to support HTTP endpoints for serverless, with Google Cloud Functions and Azure Functions offering a similar feature. The new feature wasn’t a complete surprise as it popped up in the AWS console for a few hours last November, like reported ao by Scott Piper, cloud security consultant:

It seems that the ability to call Lambdas directly over the internet without an API gateway has just been added to the SDK.

In a popular post, Rehan van der Merwe, senior cloud developer Swipe iX, summarizes the benefits and pricing of the new feature:

Lambda URL – Prices per million requests:
– Rest API (first 333 mil) = $3.5
– HTTP API (first 300 mil) = $1.0
– Lambda URL = Free
– CloudFront Proxy to Lambda URL = ~$1.0 to $1.2


Lambda URL – Timeout in seconds:
– Rest API = 29
– HTTP API = 30
– Lambda URL = 900 (15min)
– CloudFront proxy to Lambda URL = 60 (default)

Function URLs are available through the Lambda API and are supported in CloudFormation, AWS SAM, and AWS CDK. They are included in Lambda’s request price and duration and are generally available today in all regions where Lambda is supported, except China.




Roxxcloud

Leave a Reply

Your email address will not be published.

Back to top