Hi, Adrian, and welcome back.
Now, in today's video, we are going to discuss about Lambda Alias.
Now, at a high level overview, a lambda alias is like a pointer to a specific function version.
So if you look into the diagram, there are three versions of the lambda function.
You have version one, version two and version three.
So what do you do?
You can create an alias, lambda alias, and the name of this alias is stable code, and then you can
point this alias to a specific version of your code and the users can access the function version using
the aliases.
And so this alias will also have its own urine through which the users can connect to the appropriate
version.
Now, before we look into the interesting feature of Alias, let's look into this from a demo perspective
so that our concept is clear.
Now for today's demo I have a function called Demo Alias function, and this function has two versions
your version one and version two.
And we also have certain alias.
So if I click on Alias, there is one specific alias called stable code.
And if you will see this is associated with a version one.
So if I open this up, you see if you look into the R and this has an R and ending with stable code
and it is associated with version one, so the traffic going to this alias ultimately will go to the
version one of the code.
All right.
So I hope with this you understood the basics of Alias.
So now let's jump into the interesting part.
Now, one of the great features of Alias is its routing configuration, and that in turn allows us to
send a certain proportion of traffic to a specific version.
For example, you see that in this lambda alias you have 90% of traffic going to the version one of
the app and 10% of traffic going to version three of the app.
So if you are deploying a newer version of the production application, you do not directly want 100%
of traffic to go there.
Instead, you send a certain amount of traffic here and if everything is working, then you can say
100% of the traffic.
So this kind of a configuration is achievable using Alias.
Now let me also quickly show you this.
So let's go back now when we discuss about Alias.
I also have one more Alias related to the canary testing.
Now, just for simplicity here, I have distributed 850 50%.
Ideally for Canary you will not have 50%, but just for quick testing.
This is the overall approach.
So what will happen?
50% of traffic will go to version one of the code, 50% of traffic will go to the version two of the
code.
So let's quickly open this up.
You also have the URL of this year, so let's quickly try it out in browser.
So first time we received Halo from production, If I refresh this time, you see you got a different
message.
Hello from Q if I refresh hello from production.
If I refresh hello from Q Now, depending upon the requirement, you can change the weight accordingly.
You can have 9010 or 95 five accordingly as part of your overall canary testing.
Great.
So I hope with this you understood the basics.
And one of the big advantages that Alias provides associated with the overall routing configuration
between versions.
So with this will conclude today's video.