Learn with me AWS
Lambda, | cloud watch | API - Gateway are some of the serverless service.
why we need the OS, to run a code . we took the example for web app.
Write a code in php language. if we need to run php then we need the php interpretor
the code work as webapp in php, so we need to setup a webserver also . if we need to run the application in EC2 - technically in real world we need to do many things.
Plan is => Launch EC2 Instance =>
lambda function.
import json
def lambda_handler(event, context):
# TODO implement
return {
'statusCode': 200,
'body': json.dumps('Hello from manickaSundaram!')
}
API Gateway :- what is APIgateway.
Compare it with google search . contact to google by - google.com
but it goes to google.com/search so here "search" is the program(code) that is running. in google server.
its an interface to run the program search
its called "Application programing interface" - API
Gateway is the one used to run "search" so naming it as API- Gateway.- putting it before the server.
in the API gateway we create the "route/name" its one of the use to understand api gateway.
AWS Provide the service known as "API Gateway". huge network traffic. - haproxy => is similar kind of API gateway.
backend server may be EC2 / Lambda/... app available.
EVENT Driven Architecture :- EDA
Example - e-commerce - after selling - buy button - pay amount .
success event , => sent mail
fail event => sent another e-mail
any thing changes in AWS for example EC2 , change the state from running to stopped, its an event . it act as a trigger to sent sns
Comments
Post a Comment