Table of Content
A function URL is a dedicated HTTP(S) endpoint for your Lambda function.
You can control access to your Lambda function URLs using the AuthType parameter:
AWS_IAM
– Lambda uses AWS Identity and Access Management (IAM) to authenticate and authorize requests based on the IAM principal’s identity policy and the function’s resource-based policy. Choose this option if you want only authenticated users and roles to invoke your function via the function URL.NONE
– Lambda doesn’t perform any authentication before invoking your function. However, your function’s resource-based policy is always in effect and must grant public access before your function URL can receive requests. Choose this option to allow public, unauthenticated access to your function URL.In this workshop, to simplify the learning we will create functions URL with AuthType
of NONE
without implementing any authentication mechanism in the Lambda function.
Except some rare case that you may want your function URL to be public as a web hook, don’t use AuthType
of NONE
for your function URL. And in these rare case, you still need to implement basic authentication mechanism in your Lambda function. See Tutorial: Creating a webhook endpoint using a Lambda function URL - AWS Lambda
In this step, you will create 5 function URLs, one for each Lambda function.
To create the function URL for list-users
Lambda function:
Open the Functions section of Lambda console
Click list-users
function.
Open the Configuration
tab
Open the Function URL
section
Click Create function URL
In the Configure Function URL
page, choose Auth type
of NONE
.
Click Save
After the function URL is created, you can see it in the Function overview
section or in the Configuration
/ Function URL
section.
Copy the function URL, you will need it for the next step.
Repeat this process to create the function URLs for other Lambda function: create-user
, get-user
, update-user
, delete-user
.