Scenario: Application
-
Customer: I have an application which should be running on the cloud. The application is very specific and not used all the time (approximately used 4 hours (average) in a day). I want to know the hosting options in aws
-
Customer problem statement: I want to be billed/charged only when my application is used by customers
-
This is where Serverless will be handy.
-
Serverless technology internally will provision servers when the code (written as functions) is called.
-
This technology will help you to be charged/billed only when your code is being called.
-
In AWS, Serverless can be used in a Service called as AWS Lambda
-
Different Languages where AWS Lambda can be written
- Node.js
- Python
- Ruby
- Java
- Go
- C#
- Powershell
-
Advantages:
- You pay only for the compute time you consume
- Code is executed only when need and scales automatically
-
Disadvantages:
- No standards (Portability is difficult)
-
Scenarios:
- Infrequently used appications on web
- backend jobs
- automation
-
Walkthrough:
-
Usecases:
- Auto-scaling APIs
- Event Streaming
- Image and Video Processing
- Multi language applications
Concepts
- Function: function is a code that processes events which can be be invoked.
- Runtime: Runtime allowes functions in different languages to run in the execution environment.
- Event: An event is a Json formatted document that contains data for function to be processed
- Trigger: A trigger is a configuration or a resource which invokes lambda function
Pricing
AWS Boto3
- Boto3 is aws sdk for python Refer Here