AWS recently announced the general availability of Lambda Function URLs, a feature that lets developers directly configure a HTTPS endpoint and CORS headers for a Lambda function without provisioning other services.
With the new feature developers can avoid relying on the Amazon API Gateway or the Application Load Balancer to map a Lambda function to a HTTP call. Each function URL is globally unique and can be associated with a function’s alias or the function’s ARN, implicitly invoking the latest version.
Alex Casalboni, principal developer advocate at AWS, explains the scenarios where to use the new feature helps:
Function URLs are best for use cases where you must implement a single-function microservice with a public endpoint that doesn’t require the advanced functionality of API Gateway, such as request validation, throttling, custom authorizers, custom domain names, usage plans, or caching. For example, when you are implementing webhook handlers, form validators, mobile payment processing, advertisement placement, machine learning inference, and so on.
They are useful in a couple of important cases - Mono-Lambda APIs, Service to Service communication, and lightweight webhooks. I think with a few iterations, Function URLs could get much better - and possibly be the default integration mechanism for HTTP-based Lambda invocation.
How to Enable Function URL for Lambda function.
1) Open any existing lambda function.
2) Go to configuration tab.
3) Click on Function URL - new section
4) Click on Create Function URL.
5) Enable the CORS checkbox and save.
You will get the function URL in function URL section. Happy Coding !!
Comments
Post a Comment