Open In App

AWS Serverless Technologies

Last Updated : 28 Mar, 2023
Like Article

Pre-requisite: AWS

Serverless technologies allow you to run your application code in the cloud without having to worry about the servers required for your applications. AWS and other cloud providers who provide this technology enable you to focus more on developing than handling infrastructure.

The Serverless Technologies provided by AWS are:

  • Lambda: Enables you to run code as a function without provisioning any servers.
  • SQS(Simple Queue Service): A Message Queuing service that allows Decoupling and Scale Applications.
  • SNS(Simple Notification Service): A Messaging service for sending text messages, mobile notifications, and E-mails.
  • API Gateways: Allows you to Create, Publish and Secure APIs at any scale.
  • DynamoDB: It is a managed NoSQL Database.
  • S3(Simple Storage Service): It provides Object Storage and Web Hosting.


It is a serverless computing service that runs the code without you having to provision any servers. Lambda takes care of everything required to run your code including the runtime Environment. It also provides Auto-scaling and high availability. It supports languages like Java, Go, Powershell, Nodejs, C#, Python, and Ruby.


The fees depend on the number of requests, the duration of requests, and the amount of memory used by your lambda function.

  1. Requests – The first 1 million requests per month are free. Later $0.20 is charged per 1 million requests.
  2. Duration – 1-millisecond increments are charged. The price depends on the amount of memory needed by the function.
  3. Memory – First 400000 GB-seconds per month are free. Later, $0.00001667 per GB-second is charged. 

Event-Driven Architecture

Lambda functions can be triggered by:

  1. Other AWS services or called directly from any web or mobile applications.
  2. Events can include changes made to data in the S3 bucket or DynamoDB table.
  3. Other user requests include HTTP requests.  

An example where Lambda functions are used – Alexa

SQS (Simple Queue Service)

SQS enables web service applications to quickly and reliably queue messages that one component in the application generates for another component to consume. A queue is a temporary repository that waits for messages.


  • Standard Queues:- provides unlimited transactions and guarantees that a message is delivered at least once. It ensures that messages are delivered in the same order as they are sent. Occasionally, because of highly distributed architecture, more than one copy of a message might be delivered out of order.
  • FIFO Queues:- It provides first-in-first-out delivery of messages. The messages are processed exactly once ensuring that no duplicate messages are delivered.


  • SQS decouples the components of an application so they run independently, easing message management between components.
  • Any component of a distributed application can store messages in the queue. The queue can contain up to 256KB of text in any format.
  • Acts as a buffer between the component receiving the data for processing and the component producing that data.
  • Resolves scheduling issues that can happen if the producer is producing faster and the consumer is processing slower.
  • Messages are 256KB in size.
  • Text data including XML, JSON, and unformatted text.
  • Guarantees that messages will be processed at least once.
  • Messages can be kept in the queue from one minute to 14 days.

SNS (Simple Notification Service)

A web service that makes it easy to set up, operate and send notifications from the cloud. Messages sent from an application can be immediately delivered to subscribers or other applications. Applications Publish or Push messages to a TOPIC. Subscribers Receive messages from a TOPIC.

Topic:- It’s an access point, that allows recipients to subscribe to and receive identical copies of the same notification. All messages published to Amazon SNS are stored redundantly across multiple availability zones.

Benefits of SNS

  1. Instantaneous push-based delivery
  2. Simple to set up, simple APIs, and easy integration with applications.
  3. Flexible message delivery over multiple transport protocols.
  4. Inexpensive, pay-as-you-go model with no upfront costs.
  5. Easy to configure 

API Gateways

We use APIs to interact with web applications and applications use APIs to connect with each other.

Benefits of API Gateways

  • API Gateway is a service that allows you to publish, maintain, monitor, and secure APIs at any scale.
  • API Gateways allow you to connect to applications running on Lambda, EC2, or Elastic Beanstalk and services like DynamoDB and Kinesis.
  • API Gateway provides a single endpoint for all client traffic interacting with the backend of your application.
  • It allows you to connect to applications running on Lambda, EC2, or Elastic Beanstalk and services like DynamoDB and Kinesis
  • Supports multiple endpoints and targets.
  • Supports multiple versions of API so you can have different versions for your development, testing and production environment.



  • DynamoDB is a fast and flexible NoSQL database. It is consistent, single-digit millisecond latency at any scale(low latency).
  • It is fully managed. Supports key-value data models. Supported document formats are JSON, HTML, and XML.
  • DynamoDB is best used for mobile, web, gaming, IoT, and many more applications.
  • It integrates well will Lambda and can be configured to scale automatically.
  • SSD storage in DynamoDB provides fast performance.
  • It is spread across 3 geographically distinct data centers. No single point of failure.
  • DynamoDB consists of tables, items, and attributes.

ACID Transactions

DynamoDB transactions provide the ability to perform ACID transactions Read or write multiple items across multiple tables as an all-or-nothing operation.

DynamoDB Primary Keys

  1. Partition Key:- Based on the unique attribute. The value of the partition key is input to an internal hash function which determines the partition or physical location on which data is stored. If you are using the partition key as your primary key then no two items can have the same partition key.
  2. Composite Key:- It is the combination of the partition key and sort key. Items in the table may have the same partition key but must have different sort keys while using composite keys as the primary key. 

DynamoDB Access Control

  • IAM Authentication and access control are managed using AWS IAM
  • IAM permissions: we can create IAM users within your AWS account with specific permissions to access and create DynamoDB tables.
  • You can also create IAM roles, enabling temporary access to DynamoDB. 

S3 (Simple Storage Service)

  • S3 provides secure, durable, highly scalable object storage.
  • Amazon S3 is easy to use with a simple web services interface
  • S3 allows you to store and retrieve any amount of data from anywhere on the web at a low cost.
  • S3 is object-based storage so it manages data as objects rather than in file systems or data blocks.
  • The total volume of data and the no of objects you can store is unlimited.
  • S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 terabytes. 

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads