DEV Community

Cover image for Understanding Serverless on AWS
ProsperAgada
ProsperAgada

Posted on • Edited on

Understanding Serverless on AWS

Introduction:

Build and run applications without thinking about servers.
Enter fullscreen mode Exit fullscreen mode

In recent years, serverless computing has emerged as a transformative technology, revolutionizing the way developers build and deploy applications.
Amazon Web Services (AWS), a pioneer in the cloud computing industry, offers a robust serverless platform that allows developers to focus on writing code without the burden of managing infrastructure. In this article, we will delve into the world of serverless computing on AWS, exploring its benefits, architecture, and key services that empower developers to build scalable and efficient applications.

What is Serverless computing?.

Serverless computing is a cloud computing model where developers can write and run applications without the need to manage servers or infrastructure. In this model, the cloud provider takes care of all the underlying server management, allowing developers to focus solely on writing application logic.

what are the benefits of serverless computing?.
The benefits of serverless computing for developers are numerous:

  • Increased developer productivity: With serverless, developers can focus on writing code and building features rather than managing servers or worrying about infrastructure scalability. This enables faster development cycles and enhances overall productivity.

  • Automatic scaling: Serverless platforms, such as AWS Lambda, automatically scale applications based on incoming requests. This eliminates the need for capacity planning and ensures that applications can handle varying workloads, providing excellent scalability without manual intervention.

  • Cost optimization: Serverless computing follows a pay-as-you-go pricing model, where developers are only billed for the actual compute time used by their applications. This eliminates the need to pay for idle server resources, resulting in cost savings, especially for applications with sporadic or unpredictable traffic patterns.

  • High availability and fault tolerance: Serverless platforms handle the underlying infrastructure and automatically replicate applications across multiple availability zones. This ensures high availability and fault tolerance, reducing the risk of application downtime and improving reliability.

  • Simplified deployment and management: Serverless platforms abstract away the complexities of managing infrastructure, allowing developers to focus on deploying and managing their applications more efficiently. Services like AWS Lambda provide easy deployment mechanisms and integrated monitoring and logging capabilities.

  • Scalable and event-driven architecture: Serverless computing is well-suited for event-driven architectures, where applications respond to events such as data changes, API calls, or scheduled triggers. This architectural approach enables the building of highly responsive and scalable applications.

  • Ecosystem and integrations: Serverless platforms, such as AWS Lambda, offer integrations with a wide range of services and APIs, enabling seamless integration with various AWS services, third-party APIs, and software-as-a-service (SaaS) applications. This expands the ecosystem and allows developers to leverage existing services to build more powerful applications.

What are the serverless services AWS offers?.

AWS offers a varriaty of serverless services ranging from compute, application integrations, to databases.

let's take a look at AWS serverless compute services:
Amazon offers two major serverless compute services which are;
Lambda and Fargate.

How AWS Lambda works.

Image description
AWS Lambda is like a magical compute engine that runs your code in response to events or triggers. You write your code, upload it to Lambda, and AWS takes care of running it whenever the specified events occur. Lambda automatically scales your code, so it can handle any number of requests without worrying about server capacity. You only pay for the actual compute time consumed by your code, making it cost-efficient. Lambda supports multiple programming languages and integrates seamlessly with other AWS services, allowing you to build highly scalable and event-driven applications.

How fargate works

Image description

AWS Fargate is a service provided by Amazon that allows developers to run their containerized applications without having to worry about managing the underlying infrastructure. It takes care of tasks like server provisioning, scaling, and patching, so developers can focus on deploying and scaling their containers easily. Fargate integrates with popular container orchestration platforms and provides features like granular resource allocation, high availability, and automatic scaling. It also ensures security and compliance and follows a pay-as-you-go pricing model, where you only pay for the resources you use.

This are the major compute services AWS provide for their customers, Now let's take a look at application integration services.
AWS provides several serverless integration services that enable seamless communication and coordination between different components of serverless application. These services enhance the functionality and flexibility of your serverless architecture. Let's explore some of the key serverless integration services offered by AWS:

How Amazon Event Bridge works

Image description
AWS EventBridge is a serverless event bus that enables different components of your application to communicate through events. It acts as a central hub for events, allowing you to send events from sources to targets. You can filter and transform events, integrate with various AWS services and SaaS applications, and create custom event buses for better organization. EventBridge simplifies event-driven architectures and enables scalable and flexible communication between components in a beginner-friendly manner.
EventBridge can be applicable for some cases like, Image Processing Pipeline, System Monitoring and Alerts, Workflow Orchestration, Order Processing System, Real-time Analytics.
By leveraging EventBridge, you can build robust and scalable systems that respond to events and streamline various processes.

How Amazon Step Function works

Image description
AWS Step Functions simplifies the management and coordination of tasks in your application, helping you build scalable and resilient workflows. With its visual representation, built-in error handling, support for human interaction, parallel execution, and integration with AWS services, Step Functions provides a powerful tool for organizing and executing tasks within your serverless applications.

How Amazon SQS(simple queue service) works

Image description
SQS (Simple Queue Service) is an Amazon Web Services (AWS) messaging service that allows you to send, store, and receive messages between different parts of your software systems. It uses queues to temporarily hold messages, enabling decoupling and scalability. Producers send messages to the queues, while consumers retrieve and process them. SQS ensures reliable message delivery, visibility, and retention. It provides automatic scaling to handle varying message loads and offers integration with other AWS services for building flexible and robust applications.

How Amazon SNS(Simple Notification Service) works

Image description
SNS (Simple Notification Service) is an Amazon Web Services (AWS) messaging service that enables sending notifications to a large number of subscribers. It follows a "publisher-subscriber" model, where publishers send messages to topics, and subscribers receive those messages based on their subscriptions. With SNS, you can send notifications through different protocols like email, SMS, HTTP/S, or mobile push notifications.

In simpler terms, SNS is a way to send messages or notifications to many people or applications at once. Imagine a broadcaster sending news to a group of listeners. The broadcaster (publisher) sends messages to a topic, and anyone who wants to receive those messages (subscribers) can subscribe to the topic. Subscribers can choose to receive notifications through email, text messages, or other methods. SNS makes it easy to send messages to a large audience, ensuring they get the information they need quickly and efficiently.

How Amazon API Gateway works
AWS API Gateway is a service provided by Amazon Web Services that allows you to create, publish, and manage APIs (Application Programming Interfaces) for your applications. An API is like a bridge that enables different software systems to communicate and interact with each other.
In simpler terms, think of API Gateway as a receptionist at a building entrance. It manages the flow of visitors (API requests) coming into the building (your application). It checks their credentials, ensures they have the right access permissions, and monitors the number of requests they make. API Gateway takes care of all the technical details, making it easier for your applications to communicate with each other and providing security and control over how they interact.

How Amazon AppSync works

Image description
AWS AppSync is a managed service by Amazon Web Services that simplifies the process of building and deploying scalable and real-time applications with GraphQL. GraphQL is a query language for APIs that allows you to request specific data from your backend systems.
think of AppSync as a translator that helps your applications talk to your data sources using a powerful language called GraphQL. It simplifies the process of building and deploying applications by automatically generating APIs and providing real-time and offline capabilities. AppSync ensures that your applications receive the data they need efficiently and stay up-to-date with real-time updates.

How Amazon Simple S3 works
S3 (Simple Storage Service) is a popular storage service provided by Amazon Web Services (AWS). It is like a virtual hard drive in the cloud that allows you to store and retrieve any amount of data at any time.

In simple terms, think of S3 as a giant storage room where you can keep your files and objects. It provides a secure and reliable way to store your data, whether it's documents, images, videos, or backups. S3 is highly scalable, meaning it can handle small or large amounts of data without any trouble. You can access your stored data from anywhere in the world using a unique web address. S3 is also designed to be durable, meaning your data is protected and highly available, even in the event of hardware failures or natural disasters.

How Amazon EFS works

EFS (Elastic File System) is a scalable and managed file storage service provided by Amazon Web Services (AWS). It offers a simple way to store and access files from multiple instances or servers simultaneously.

In simple terms, EFS is like a shared network drive in the cloud. It allows multiple users or systems to access and modify the same files simultaneously, making it ideal for collaborative work or applications that require shared file storage. EFS is highly scalable, meaning it can grow or shrink as your storage needs change, without any disruptions.

How Amazon DynamoDB works

DynamoDB is a fully managed NoSQL database service provided by Amazon Web Services (AWS). It offers a simple and scalable way to store and retrieve structured data, making it suitable for a wide range of applications.

In simpler terms, think of DynamoDB as a digital filing cabinet where you can store structured data, such as user information, product details, or sensor readings. It eliminates the need for traditional database management tasks, as AWS takes care of scaling, backups, and maintenance. DynamoDB provides fast and reliable performance, even with large amounts of data, and can automatically scale up or down to meet your application's needs.

How Amazon Aurora works

Amazon Aurora is a fully managed relational database service offered by Amazon Web Services (AWS). It combines the best features of traditional databases, like MySQL and PostgreSQL, with the scalability and availability of the cloud.

In simple terms, think of Aurora as a powerful and efficient database engine that helps you store and retrieve structured data for your applications. It is designed to handle large workloads with low latency and high performance. Aurora automatically replicates your data across multiple availability zones for increased durability and fault tolerance.

How Amazon OpenSearch works

OpenSearch is an open-source search and analytics engine that enables you to index, search, and analyze large volumes of data. It is derived from the popular Elasticsearch project and provides powerful search capabilities for various applications and use cases.

In simpler terms, think of OpenSearch as a smart search engine that helps you find information quickly from vast amounts of data. It can be used to build search functionality in applications, websites, or even analyze logs and metrics. OpenSearch supports full-text search, allowing you to search for specific words or phrases within your data. It also offers advanced search features like filtering, sorting, and aggregations to extract valuable insights from your data.

other serverless under database include RDS proxy, Redshift and Naptune.

Top comments (4)

Collapse
 
rickdelpo1 profile image
Rick Delpo • Edited

Hey very consise, I was able to read the whole thing without getting lost.

My recent AWS Serverless adventure included hosting my website using AWS Cloudfront and S3. My site is now blazing fast! If u or ur readers are interested here is a small writeup of the challenges I faced while migrating to AWS Cloudfront, entitled, the Gotchas no one tells u about.

dev.to/rickdelpo1/cloudfront-dns-m...

Collapse
 
prosperagada profile image
ProsperAgada

I totally agree with you @rickdelpo1 the world of serverless is so vast world we developers can only work to specialize in some specific domains..

Collapse
 
edwina profile image
Edwinađź’—~ Abah

Incredible insights into the world of serverless computing! This article has sparked my curiosity and left me feeling inspired to explore its potential further. Thank you for shedding light on this game-changing technology.

Collapse
 
prosperagada profile image
ProsperAgada

Am pleased this piece of article gave you some insight.