AWS Serverless Services and Their Use-Cases — Part 1

SoumyaRanjan
KloudMate

--

Basic AWS Serverless Representation Diagram

Keeping up with ever evolving technologies can be overwhelming. Here’ we try to break down some of the AWS Serverless Services and their use-cases (not limited to) in two parts. Here goes Part I.

AWS Lambda:

  • Operating serverless websites:
    The new era of serverless computing has made the need for dedicated servers and virtual machines, redundant. With AWS, hosting a website on serverless infrastructure is much simpler. The static content (front end) lies on S3 storage, while the backend logic runs on Lambda. You can invoke your Lambda functions over HTTP, using Amazon API Gateway, that acts as the HTTP endpoint. Lambda has the ability to handle application logic and persist data to a serverless database like AWS Aurora. You can also secure your infrastructure, using a Virtual Private Cloud (VPC) and other networking resources that allow you to control network access to and from your AWS resources.
  • Faster document conversion and file processing:
    A lot of times, we need data in different formats as per their needs — be it HTML, PDF or any other special format. Storing data in multiple formats statically, is not possible, as it requires huge space and it practically is a big issue if and when the content changes frequently. Retrieving the required content, formatting and converting it, and serving it is a task done best using AWS Lambda. Also, if you want to store uploaded images on your site within an S3 bucket, while storing thumbnails of the images on another, it is a job that can be easily accomplished using AWS Lambda.
  • Serverless Authentication:
    AWS Lambda, closely integrated with AWS Cognito, carries out the personalization of your authentication routine. Amazon Cognito when used with AWS Lambda, can empower you to add pre and post-login hooks to execute your custom logic. Based on user pool operation, Lambda triggers happen.
    For example: Before sending out confirmation emails, Amazon Cognito will check with your Lambda function, that gives you a chance to check and correct the text. The common triggers here are request for new passwords, or important contact information updation, or confirmation related emails.
  • Data and analytics:
    For analytics applications whose raw data is stored on a DynamoDB table, you can write a Lambda function to generate custom metrics by aggregating raw data. By this, when you write, update, or delete items in a table, DynamoDB streams can publish item update events to a stream associated with the table.
  • Bulk real-time data processing:
    When data comes from different sources such as applications or websites, handling and analysis of the metrics to process data in real-time is a tough task. That is when Lambda comes into the picture. Using a stream-based model, arranging data sources becomes an easier task. Lambda in integration with Kinesis, makes for quick processing of large volumes of information in real time.
  • AWS Lambda Use Case for Building Serverless Chatbots:
    Chatbots are becoming more relevant in the age of information delivery and customer lifecycle management, regardless of the industry. Customer service departments typically use chatbots to automate customer interactions, business transactions, and improve business value. According to a research, nearly 60% of companies either use chatbots or plan to do so in 2022. Chatbots play a significant role in the field of AI and Machine Learning.
    In a serverless chatbot architecture, Amazon Lex plays a huge role. It is an AWS service for building conversational interfaces for applications using voice and text. It enables any developer to build conversational bots quickly. User requests are generally processed by Amazon Lex and responses are based on configurations done for the application.

2. API Gateway:

  • Amazon API Gateway assists in creation of HTTP APIs:
    Restful APIs can be created using HTTP APIs, which facilitate lower latency and are much more cost effective than REST APIs.
    For Serverless deployments, AWS API Gateway enables seamless communication between client and Lambda functions. A Lambda function can be invoked by a client’s API call, by merely integrating AWS Lambda and API Gateway.
  • API Gateway to create WebSocket APIs:
    You can use API Gateway WebSocket APIs to build secure, real-time communication applications without having to provision or manage servers, connectivity or large-scale data exchanges. This includes real-time applications such as:
    - Chat applications
    - Real-time dashboards such as stock tickers
    - Real-time alerts and notifications
  • REST API:
    REST APIs created using API Gateway let developers work on both client as well as server side independently, allowing them to display the information on the client-side and store the data on the server-side.

3. Amazon Aurora:

  • Amazon Aurora is the great option for SaaS Products:
    SaaS applications generally use architectures that are multi-tenant in nature, with flexibility in compute and storage scaling. Amazon Aurora provides flexibility for such use cases, along with high performance and reliability, that can help SaaS companies to build effective, high performance applications.
  • Web and Mobile Gaming:
    Web and mobile games need high throughput databases, massive storage scalability, and high availability. Amazon Aurora is able to fulfil these requirements at a lesser cost, compared to other database services.
  • Enterprise Applications:
    Amazon Aurora is compatible with Relational Database. Companies which are familiar with RDS can use Amazon Aurora to replace any Relational Databases. Aurora is more efficient, reliable, highly available and cost effective, and a great for provisioning, patching, backup, recovery, failure detection, and repair.

4. AWS Athena:

  • Analyze AWS Costs and Usage reports:
    Athena helps you analyze unstructured, semi-structured, and structured data stored in Amazon S3, which can include CSV, JSON, or columnar data formats.
  • Data visualization:
    Athena can be used to generate reports and to explore data with business intelligence tools or SQL clients connected with a JDBC or an ODBC driver.
  • Metadata stored in S3:
    With the help of Athena and AWS Glue Data Catalog, you can create a persistent metadata repository for your data on Amazon S3. Athena enables you to construct tables and query data.

5. AWS Step Functions:

  • Microservice Orchestration:
    Microservice applications benefit greatly from AWS Step Functions. Step Functions’ main purpose is to orchestrate workflow, that can assist microservice applications in composing higher-level activities. You may use ‘retry and catch’ clauses in Step Functions to handle problems from task states, resulting in fault-tolerant microservices.
  • ETL workflow:
    In the AI and data analysis era Extract, Transform, and Load (ETL) jobs are generous in the organizations. For the data analysis process before the data analysis is completed data points should be handled efficiently in multiple steps. Also in Machine Learning the processing of pipelines is done in multiple steps. Step Function is the best option to complete these tasks effectively.
  • Batch Processing:
    Extract, Transform, and Load (ETL) positions are plentiful in this age of AI and data analysis. Data points need to be handled efficiently in numerous phases during the data analysis process. Pipeline processing is another critical task that needs to be performed in numerous phases of Machine Learning. As a result, step functions are the most efficient way to execute these jobs.

--

--