Upload
atlogys-technical-consulting
View
52
Download
3
Embed Size (px)
Citation preview
Welcome
Serverless Architecture - Infinite scaling using Lambda & AWS
Presented By
Rohit Kumar
Table of Contents
1. Introduction
2. AWS Lambda
o Benefits
o Limitations
o Languages it supports
o How it works
3. AWS Services
o Amazon S3
o Amazon Dynamo DB
o Amazon SNS
o Amazon API Gateway
Table of Contents
o Amazon SQS
o Amazon CloudFront
o Amazon CloudWatch
4. Access Control Services
Introduction
Serverless computing allows you to build and run applications and
services without having to manage infrastructure. Your application still runs
on servers, but all the server management is done by AWS. You no longer
have to provision, scale, and maintain servers to run your applications,
databases, and storage systems.
Serverless architectures refer to applications that significantly depend on
third-party services (knows as Backend as a Service or "BaaS") or on
custom code that's run in ephemeral containers (Function as a Service or
"FaaS"), the best known vendor host of which currently is AWS Lambda.
AWS Lambda
A compute service where you don’t have to think about:
• Servers
• Being over/under capacity
• Deployments
• Scaling and fault tolerance
• OS or language updates
• Metrics and logging
But where you can easily
• Bring your own code…. even native libraries
• Run code in parallel
• Create backends, event handlers and data processing systems
• Never pay for idle!!
AWS Lambda
Benefits • Serverless
• Event-Driven Scale
• Subsecond Billing
• Simple Development and Deployment
• Automatic Scaling and Fault Tolerance
• Security
• Cost Efficiency
AWS Lambda
Limitations • Maximum execution duration per request is set to 300 seconds
• Lambda function deployment package size, which is set to 50MB
• Another significant issue to consider is AWS Lambda Cold Start. It
takes some time for the Lambda function to handle a first request,
because Lambda has to start a new instance of the function. The cold
start can be a real problem for your function, if at any time you expect
a fast response and there are no active instances of your function.
AWS Lambda
Language it supports
AWS Lambda is an ideal compute platform for many application scenarios,
provided that you can write your application code in languages supported by
AWS Lambda (that is, Node.js, Java, and Python), and run within the AWS
Lambda standard runtime environment and resources provided by Lambda.
Essentially, the lambda function code runs on Amazon Linux, and as such
can use any tools included with the OS (including, for example, installation
of python packages using pip, or node.js packages using NPM).
AWS Lambda
How it works
When AWS Lambda executes your Lambda function on your behalf, it takes
care of provisioning and managing resources needed to run your Lambda
function.
When you create a Lambda function, you specify configuration information,
such as the amount of memory and maximum execution time that you want
to allow for your Lambda function.
When a Lambda function is invoked, AWS Lambda launches a container
(that is, an execution environment) based on the configuration settings you
provided.
AWS Lambda
How it works
AWS Services
Amazon S3 can publish events (for example, when an object is created in a
bucket) to AWS Lambda and invoke your Lambda function by passing the
event data as a parameter. This integration enables you to write Lambda
functions that process Amazon S3 events. In Amazon S3, you add bucket
notification configuration that identifies the type of event that you want
Amazon S3 to publish and the Lambda function that you want to invoke.
Amazon S3
AWS Services
Amazon S3
AWS Services
• NOSQL Database
• Fast & Flexible
• Fully managed cloud database
• Document and key-value store model
• Automatic scaling of throughput capacity
You can use Lambda functions as triggers for your Amazon DynamoDB
table. Triggers are custom actions you take in response to updates made to
the DynamoDB table. To create a trigger, first you enable Amazon
DynamoDB Streams for your table. Then, you write a Lambda function to
process the updates published to the stream.
Amazon DynamoDB
AWS Services
Amazon DynamoDB
AWS Services
• Flexible, fully managed pub/sub messaging
• Fan-out messages to a large number of subscribers
• Easy to set up, operate, and reliably send notifications to all your
endpoints – at any scale
• Eliminates the complexity and overhead associated
Amazon Simple Notification Service (SNS)
AWS Services
Configuring Amazon SNS with Lambda Endpoints
• In the left Navigation pane, click Topics, and then click the topic to which
you want to subscribe a Lambda endpoint.
• Click Actions and then click Subscribe to topic.
• In the Protocol drop-down box, select AWS Lambda.
• In the Endpoint drop-down box, select the ARN for the Lambda function
• Click Create subscription.
Amazon Simple Notification Service (SNS)
AWS Services
• Fully managed service that makes it easy for developers to create,
publish, maintain, monitor, and secure APIs at any scale
• Accepts and process up to hundreds of thousands of concurrent API
calls, including traffic management, authorization and access control,
monitoring, and API version management
• Low-Cost and Efficient
• Create RESTful Endpoints for Existing Services
Amazon API Gateway
AWS Services
Amazon API Gateway Work Flow
AWS Services
Amazon SQS(Simple Queue Service)
• Fast, reliable, scalable, fully managed message queuing service
• Simple and cost-effective to decouple the components of a cloud
application
• Transmit any volume of data, without losing messages
• Includes Standard queues with high throughput and at-least-once
processing, and FIFO queues that provide FIFO (first-in, first-out)
delivery and exactly-once processing
AWS Services
Amazon SQS Work Flow
AWS Services
Amazon CloudFront
• Global content delivery network (geographically dispersed servers)
service that accelerates delivery of your websites, APIs, video content or
other web assets through CDN caching
• Low latency- Improve media load times
• High bandwidth- Enable high bit rate HD video and other media
application
• Scalable- Ensure great experience as number of end user grows
AWS Services
Amazon CloudFront
AWS Services
Amazon CloudWatch
• It provides a reliable, scalable, and flexible monitoring solution that you
can start using within minutes. You no longer need to set up, manage,
and scale your own monitoring systems and infrastructure.
• Use CloudWatch to monitor your AWS resources and the applications
you run on AWS in real time.
• Use CloudWatch Events to send system events from AWS resources to
AWS Lambda functions, Amazon SNS topics, streams in Amazon
Kinesis, and other target types.
• Use CloudWatch Logs to monitor, store, and access your log files from
Amazon EC2 instances, AWS CloudTrail, or other sources.
Access Control Services
Identity & Access Management
• Security control access to AWS services and resources
• Create AWS users and groups
• Assign permissions to users and groups
• Use permissions to allow and deny their access to AWS resources
THANK YOU