SUBSCRIBE TO OUR BLOG
Get our new blogs delivered straight to your inbox.
THANK YOU FOR YOUR REGISTRATION!
We will make sure to share the best materials designed for you!
2 minute read
Written by Oguzhan Ozdemir
Solution Engineer @Thundra
The usability of the AWS Lambda service is improving day by day. Having the ability to directly open your Lambda functions to the internet without having to manage additional services such as Amazon API Gateway or AWS Elastic Load Balancing is long desired.
Today, AWS publicly announced Lambda function URLs as a way to directly trigger Lambda functions using the HTTPS endpoint. Thundra, as an advanced technology partner of AWS and serving serverless users with observability tools, is very excited about this update and as usual being one of the launch partners . Lambdas with function URLs enabled will be different from the API gateway or other trigger methods in your distributed trace map on Thundra.
Let’s talk about how you can enable function URLs on AWS, then see how Thundra behaves when a function is triggered this way.
There should be a new page about your function Configuration page that says Function URL. When we enter it will list our existing function URLs if available. Let’s click Create and discover our options.
When configuring a function URL, we must first choose an authentication method. It’s pretty trivial what this option does. When set to AWS_IAM, only certain users and roles with the appropriate permissions will trigger this function through a function URL. When set to NOTHINGas expected, it won’t perform any authentication and the endpoint will be public.
Finally, once created, it should give us a URL in the following format:
Pay attention to permissions
There is one point to pay attention to. Even if your function doesn’t have an authentication configuration configured and has a public URL, it still needs to have the appropriate permissions to allow users to access it. This predefined authorization is usually created automatically with the URL of the function itself. However, in all cases this does not happen, you need to set the following permissions for your function.
Experimentation in Thundra APM
Now that our function URL is ready, let’s see how Thundra handles this.
When we enter Thundra APM after instrumenting our function, we can see the invocations appear.
Let’s click on one of the summons.
For this simple example we used a simple Hello World function and there is only one resource here. Let’s see what it looks like in the trace map.
It displays as you’d expect; triggered via an HTTP endpoint.
We are very happy to see AWS Lambda improving and creating solutions to make things easier for its users. Function URLs will be very useful in some situations where you don’t want to deal with other services to make your code available on the internet. Be sure to visit AWS Docs to see full documentation on function URLs and its configuration options.