0% found this document useful (0 votes)
98 views

Serverless Using Aws Lamdba For Java Developers

Serverless architectures allow building applications without managing infrastructure. Functions as a Service (FaaS) allows running code in response to events using nanoservices. FaaS provides automatic scaling, high availability, and pay-per-use pricing. Serverless applications are built by breaking applications into small, independent functions that are triggered by events like HTTP requests, messaging queues, or cloud services. This event-driven approach improves scalability and reliability compared to traditional monolithic applications running on virtual machines.

Uploaded by

Dani Buitrago
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

Serverless Using Aws Lamdba For Java Developers

Serverless architectures allow building applications without managing infrastructure. Functions as a Service (FaaS) allows running code in response to events using nanoservices. FaaS provides automatic scaling, high availability, and pay-per-use pricing. Serverless applications are built by breaking applications into small, independent functions that are triggered by events like HTTP requests, messaging queues, or cloud services. This event-driven approach improves scalability and reliability compared to traditional monolithic applications running on virtual machines.

Uploaded by

Dani Buitrago
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Serverless

IaaS

BaaS
Speed to market

Low infrastructure cost

Scalability and Reliability

Usage based cost


The Evolution

Public Cloud Functions


+ Nano Services

Private Cloud Containers Microservices

Shared Data Centres Virtual Machines N-Tier Apps

Data Centres Physical Servers Monolithic

Hosting Hardware Computational Units Architecture Styles


Nano Services

Do one thing
Serverless Nano Services
Repo
Be more useful than the cost incurred Algorithms

Async Event Based Triggers


handler( )
main()
FAAS

controllers

handler( ) services

Logging daos
Error Handling
Cloud

Zip Formation

IDE
Upload to S3
Maven
Create IAM Roles
Git
Create Resources
Deployment
Create Functions

SAM Configure Permissions


BaaS Service
FaaS Service
Functions

Function

App Process Function

Function
Server Process
Function
Lambda Service

Lambda Host Environment

Java Virtual Machine

Lambda Java Runtime

Lambda Function
Invocation
Scaling Reliability

Lambda Service AZ2

AZ1
AZ3
Limits
1000 executions at a time
4 KB
64 MB for Sync

256 KB for ASync


Pricing

Time rounded to closest milli seconds

And the memory we allocate

GB-Sec

1000000 400000
sam build
SAM
sam deploy
AWS

Cloud
Formation
Create Lambda

Deploy Lambda

Lambda Service

Lambda Host Environment

Invoke Lambda
Python Runtime

Lambda Function
Create Lambda

Deploy Lambda

Lambda Service

Lambda Host Environment

Invoke Lambda
Java Virtual Machine

Lambda Java Runtime

Lambda Function
Create IAM User
AWS CLI
AWS SAM CLI
Install Java
Install Eclipse
Install Maven
Invocation
Console

AWS
AWS CLI

SDK
Microservices

Messaging
EC2

EBS

S3
Kinesis

DynamoDb
Chatbots

Alexa
EC2
CloudWatch

S3
Bucket

Cloud
Formation S3
API Gateway as Event Trigger
S3 as Event Trigger
Sync API Gateway Alexa CloudFront

Lambda Service
Kinesis Data Streams
Lambda Host Environment

Java Virtual Machine Dynamo DB Streams


Lambda Java Runtime

Lambda Function

Polling SQS

ASync S3 SNS CloudFormation


Scaling

Security
patientData.json v1
patientData.json v2

Bucket Name
Key
Attributes
firstName lastName ssn email

Item

Keys
Partition Key
Sort Key
API Gateway as Event Trigger

Create Customer

Get Customers
API Gateway as Event Trigger

Customer
firstName
lastName
rewardPoints
S3 as Event Trigger

Student
rollNo
name
testScore
grade
S3 as Event Trigger ReportGenerator

GradeCalculator
Async Function Sync Function
truckTracker getTicket
Latitude Payment
Longitude Ticket
Cold Start

Lambda Service

Lambda Host Environment

Java Virtual Machine

Lambda Java Runtime

Lambda Function
When

Deployed or Changed
Instances Expired Time Taken
Removed due to age
Scaling
Logging

Function Log Group

Instance1 Log Stream1


Instance2 Log Stream2
Error Handling
Sync
Return a nice error
Lambda Service Kinesis Data Streams
Lambda Host Environment

Dynamo DB Streams
Python Runtime

Lambda Function

Polling SQS

Failure Handling
Retries Log
ASync
DeadLetterQueue/Destination Lambda Function
Lambda Service
Event
Lambda Host Environment
Source

Java Virtual Machine

Lambda Java Runtime

Lambda Function
Event
Source Threads Library
Threads

Event
Lambda Host Environment
Source

Java Virtual Machine

Lambda Java Runtime

Lambda Function
SQS

aSync

Lambda
Service

messageId
Batch
Visibile

Lambda
Service

You might also like