Please use the menu below to navigate the article sections:
Serverless computing has been on the rise the last few years, and whilst there is still a large number of customers who are not cloud-ready, there is a larger contingent of users who want to realize the benefits of serverless computing to maximize productivity and to enable newer and more powerful ways of building applications.
Serverless in cloud computing
Serverless is a cloud computing execution model in which the cloud provider allocates machine resources on demand and manages the servers on behalf of their customers. Cloud service providers still use servers to execute code for developers, which makes the term “serverless” a misnomer. There is always a server running in the background somewhere, and the cloud provider (AWS in this case) will run the infrastructure for you and leave you with the room to build your applications.
Within the AWS world, the principal Serverless service is AWS Lambda. Using AWS Lambda, you can run code for virtually any type of application or backend service without provisioning or managing servers. AWS Lambda functions can be triggered from many services, and you only pay for what you use.
So how does AWS Lambda work? Using Lambda, you can run your code on high availability compute infrastructure and manage your compute resources. This includes server and operating system maintenance, capacity provisioning and automatic scaling, code and security patch deployment, and code monitoring and logging. All you need to do is supply the code.
AWS Lambda versioning
Within the Lambda service, you can specify different versions of your lambda functions. You can use these versions to manage the deployment of your functions. If you want to add beta testing to a function, you can do so without affecting stable production users. Every time you publish your function, Lambda creates a new version – copying the unpublished version of the function into the new version.
This is useful because the function consumers can continue using a previous version without any disruption. The function publisher can let consumers know about the newest version. Each consumer can test and plan accordingly before upgrading. Or the publisher can conduct tests and upgrade to the latest version of your Lambda function.
The concept of a function alias is similar to that of a pointer. An alias points to a specific version of a function. It is possible to update the version to which the alias points as needed. Publishers can upgrade functions without having to update consumer requests because the version pointer is transparent to consumers.
Aliases cannot point to other aliases, only to function versions.
Each alias has its own unique ARN, just like versions.
After new versions have been thoroughly tested, aliases can be used to route traffic to them. For instance, a function can have a test and a production alias. The development team deploys a new version, tests it appropriately, and then points the production alias to the new stable version.
When you are deploying your Lambda functions as an alias, you are deploying your AWS Lambda function in a much safer way. You can ensure that you can make iterative changes to your code and that the correct code is pushed into production.
You create Lambda Function versions and aliases to manage function deployment and invocation. Lambda Function code and configuration can be stored as an immutable snapshot by publishing a version and creating an alias that points to a specific version, making it easier for developers to make Lambda Function code changes without requiring changes on the client side (client-application that calls your Lambda Function).
Learn how to Master the AWS Cloud
AWS Training – Our popular AWS training will maximize your chances of passing your AWS certification the first time.
Membership – For unlimited access to our entire cloud training catalog, enroll in our monthly or annual membership program.
Challenge Labs – Build hands-on cloud skills in a secure sandbox environment. Learn, build, test and fail forward without risking unexpected cloud bills.