How Tools and Technology Dictate the Digital Collections Management Workflow
Why do workflows vary so much between institutions?
Posted on in Blog Posts
Posted on March 27, 2023 in Blog Posts
Welcome to our second blog on the topic of serverless computing! This post will introduce you to Function as a Service (FaaS) and AWS Lambda. In a serverless architecture, a FaaS, such as AWS Lambda, Google Cloud Functions, and Microsoft Azure Functions, acts as an event handler and microservice, executing tasks in response to triggers like HTTP requests and database changes. For example, a database change when a new record is added or updated in a library’s catalog management system can automatically trigger newly added metadata to index, making them searchable for patrons. This post will focus on AWS Lambda. Lambda functions are like glue, connecting and communicating with other AWS servers and facilitating the exchange of information between components.
Customers who use FaaS are only charged when the function executes and are not charged for idle computing time, making it a cost-effective, scalable, and flexible solution for ad hoc applications, such as image processing to improve image quality or extract, transform, and load (ETL) pipeline to extract metadata from digital books and materials.
In this post, you will learn the steps to create and deploy a simple AWS Lambda function in Python. This Lambda function receives an incoming event in a JSON format, processes the event content, and returns an appropriate output message. The complete program and deployment code example are available in the author’s GitHub repository. To make this process easier, we’ll cover both the AWS Console and AWS SAM Command Line Interface (AWS SAM CLI) methods.
More on this topic: Coding Small-Scale Projects with Big Impact
The event source for this Lambda function can be either another AWS service, such as AWS Simple Storage Service (S3), or an external service outside of AWS. For instance, when a file is uploaded to S3 for preservation, we may want to record its location in a database for future retrieval. Here’s how the process works in the above diagram:
Before you process, please have an AWS account and install AWS Command Line Interface (AWS CLI) and AWS SAM CLI.
That is it. You have successfully created and deployed an AWS Lambda function using the AWS console!
Once you have successfully installed the AWS SAM CLI on your local machine, proceed to download the demo source code. The file will be in a zip format, so unzip it after download.
By the end of this process, you have successfully created and deployed an AWS Lambda function using the AWS SAM CLI.
In this blog, we walked you through the steps of creating and deploying an AWS Lambda function using both the AWS Console and AWS SAM CLI. We hope you now have a good understanding and practical experience of how to create an AWS Lambda function. In our next post, we will delve into serverless patterns and more complex serverless architectures, providing you with the knowledge you need to adopt existing patterns to address your specific use case and create your own serverless application.
Choice and LibTech Insights gratefully acknowledge our launch sponsor, Dimensions, a part of Digital Science. Dimensions, is the largest linked research database available and provides a unique view across the whole research ecosystem from idea to impact.
Sign up for LibTech Insights (LTI) new post notifications and updates.
Interested in contributing to LTI? Send an email to Deb V. at Choice with your topic idea.
Why do workflows vary so much between institutions?
Posted on in Blog Posts
Five great books to get you started
Posted on in Blog Posts
A match made in library school
Posted on in Blog Posts
A Q&A with two librarians from Texas A&M–Corpus Christi
Posted on in Blog Posts