Open In App

AWS Serverless Technologies

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

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.



Pricing

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.

Types

Features

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

 

DynamoDB

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

S3 (Simple Storage Service)


Article Tags :