AWS Lambda
implementation
for live project
● 12+ years of experience in IT
● 5+ years experience of AWS
● 3+ years experience in Business Intelligence
Vitalii
Hryhoryshyn
Tech Lead in Ven Commerce Ltd.
Short
Agenda
What is AWS Lambda?
Why did we need it?
Disadvantages of Lambda & how we solve it
Advantages of Lambda & results of implementation
AWS Lambda
what is it?
“let’s compare AWS Lambda &
simple web application
web application
Request
24/7
Response
web application
24/7
web application
Request
24/7
Response
Request
Request
Response
Response
AWS Lambda (serverless app)
AWS Lambda (serverless app)
Request
Response
AWS Lambda (serverless app)
AWS Lambda (serverless app)
Request
Response
AWS Lambda (serverless app)
Request
Response
Request
Request
Response
Response
Why did we need
AWS Lambda?
Prerequisites...
3 years ago...
Team
Structure
3 years ago...
3 years ago...
Business
Structure
3 years ago...
3 years ago...
3 years ago...
Common
things in
Magento 1 &
Magento 2
Common
things in
Magento 1 &
Magento 2
word “Magento”
Common
things in
Magento 1 &
Magento 2
word “Magento”
???
monolithic
architecture
complexity
obstructions
monolithic
architecture
complexity
regression tests
obstructions
monolithic
architecture
complexity
regression tests
deployment time limit
obstructions
monolithic
architecture
complexity
regression tests
deployment time limit
slow down the start-up time
obstructions
monolithic
architecture
complexity
regression tests
deployment time limit
slow down the start-up time
no easy adopting new technologies
obstructions
monolithic
architecture
break monolith!!!
Serverless application
Advantages: no need for server, low cost, scalable
Disadvantages: new “unknown” technology, no
ready development environment
AWS Lambda
Small project, using PHP & MySQL
Possible frameworks: laravel, yii
Advantages: PHP & MySQL
Disadvantages: server is needed
Microservice
Microservice VS AWS Lambda
Microservice
DevOps
server cost
security
updates framework &
language
dependency
24/7
AWS Lambda (serverless app)
DevOps
server cost
security
updates framework &
language
dependency
24/7
AWS Lambda (serverless app)
DevOps
server cost
security
updates framework &
language
dependency
24/7
AWS Lambda (serverless app)
DevOps
security
updates framework &
language
dependency
24/7
AWS Lambda (serverless app)
DevOps
framework &
language
dependency
24/7
AWS Lambda (serverless app)
framework &
language
dependency
24/7
AWS Lambda (serverless app)
framework &
language
dependency
AWS Lambda
troubles, that we faced during the implementations
Disadvantages
of AWS Lambda
application
structure
Basic structure
API write to db
application
structure
Basic structure
API
API
API
execution
limit
5 minutes of execution
now it is 15 minutes
other
limits
AWS Lambda Quotes
state
machine
State machine
state
machine
AWS Step Function
state
machine
AWS Step Function
Lambda 1
Lambda 2
deployment
No deployment mechanism
deployment
List of items to deploy
Lambda 1
Lambda 2
Step Function
IAM Role for Step Function
IAM Role(s) for Lambdas
CloudWatch Metrics & Alarms
deployment
AWS CloudFormation
infrastructure as code
access
issues
AWS CloudFormation deployment
Daily
meeting
Lonely man on Daily meeting
new
technology
No best practices
new
technology
No ready local environment
Language selection
PHP
language
the choosing of the language
No PHP
language
No PHP
language
Denial BargainingAnger Depression Acceptance
No PHP
language
BargainingAnger Depression AcceptanceDenial
No PHP
language
Bargaining Depression AcceptanceDenial Anger
No PHP
language
Depression AcceptanceDenial Anger Bargaining
No PHP
language
AcceptanceDenial Anger Bargaining Depression
No PHP
replaced
with cool
AWS features
Denial BargainingAnger Depression Acceptance
what did we get from Lambda?
Advantages
of AWS Lambda
no monolith
Security Patches
For any web application we have
updates of core, that can be
really painful sometime
ENV maintenance
For any web application we
should have some OS,
Nginx/Apache, Programming
language. etc
Regression testing
No relation to main workflow of the
web application
Less complexity
No hard relations to the main
project
no real
users
in our case
no limits for
deployment
no limits
from Magento
extensibility
API write to db
extensibility
API write to db
extensibility
API write to db
extensibility
API
write data to
S3 bucket
replace RDS
with S3 bucket
+ AWS Glue
allows to keep services and
data safe
IAM
allows to monitor
applications, prepare
metrics and alarms
CloudWatch
allows to prepare template
for easier deployment of
services
CloudFormation
allows easily execute small
amount of code to solve
simple business issues
Lambda
allows to store large amount
of data
S3
allows to build apps with a
few related Lambdas
Step Function
AWS Ecosystem
+1 potential
solution
+1 potential
solution
10+ new
Lambdas
Other
data
sources
Conclusion
AWS Lambda & Serverless apps are not a Silver Bullet,
but they can help you in many cases
Thanks!
You can find me at: vitaly.grigorishin@gmail.com
Any questions?

"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин