Lambda: Function URL vs Alias Function URL

0

Trying to get to grips with some CloudFormation scripts and my limited experience of Lambda, but what is the difference between a Function URL and an Alias Function URL?

From the documentation it appears to be that the Lambda Function URL will always use the $LATEST version of a function, while an Alias Function URL can be associated with a particular version which could differ from $LATEST. Given my understanding, is there any value in creating an Alias named latest which points to version $LATEST?

In addition, if creating, and assuming it is possible, Lambda and Alias Function URLs would these have the same values or would the URL ID differ, i.e. https://<url-id>.lambda-url.<region>.on.aws?

asked 5 days ago156 views
1 Answer
1

Hello.

If you create a function URL for each alias, the ID included in the URL will be different.
For example, you can create an alias for each production environment or development environment, edit the "$LATEST" version, and then deploy to the development or production environment alias after testing.
Therefore, I think the best way to use "$LATEST" is to use it for testing, and then deploy it to another alias once the testing is complete.
https://dev.classmethod.jp/articles/expose-your-lambda-with-function-urls/#Developer%2520%252F%2520Solutions%2520Architect%2520POV
https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html

profile picture
EXPERT
answered 5 days ago
profile picture
EXPERT
reviewed 5 days ago