4. ● 12x AWS Certified
● AWS User Group Leader - Surat
● AWS Serverless Hero (since 2020)
● AWS Certification SME - Associate
● Founder @ AppGambit - AWS Consulting Partner
I am..
5. ● Why use Cloud
● What’s inside Amazon Web Services
● Use cases
● Design Evolable Systems
● Summary
Agenda
6. Why use Cloud - Startups and Cloud
Launch
MVP Faster
Focus on
Feature Engineering
Iterate Quickly
Fail Fast
Keep Cost
Minimum
7. AWS is the leader in the Cloud
Infrastructure and Platform Services as
per the Gartner Magic Quadrant 2020.
Some of the most popular services on
AWS are:
● RDS and Aurora for Database
● DynamoDB for NoSQL Database
● Lambda for Serverless Computing
● S3 for Data Storage and Hosting
● SageMaker for Machine Learning
● And many more...
Why use AWS
9. Before we jump on AWS
With More Power comes More
Responsibilities
10. AWS is quite vast, but focus on What you Need
Take a simple example of Amazon EC2 Instances
● Charge for Per Second depending on your Configurations
○ Instance Family
○ Number of CPU
○ Amount of RAM
● Charge for Allocated Disk Size and Type
○ Size of Disk in GBs
○ HDD vs SSD
● Charge for Data Transfer
○ Data Transfer IN is FREE
○ Data Transfer OUT is NOT
12. ● Growing a system in a natural way,
● By adding the minimum amount of code to satisfy the business needs
● In an iterative and incremental approach.
When done right, the code structure changes continuously to optimize for
change, thus allowing a constant speed of development for longer periods of
time.
Evolutionary Design is the practice of
13. ● Growing a system in a natural way,
● By adding the minimum amount of code to satisfy the business needs
● In an iterative and incremental approach.
When done right, the code structure changes continuously to optimize for
change, thus allowing a constant speed of development for longer periods of
time.
Evolutionary Design is the practice of
14. Own Less, Build More
● Use the Right Service with Right Configurations
○ Do you need Virtual Machines running 24x7!!
○ Do you need 100gb of Disk space to start with!!
● Don’t Reinvent the wheel
○ Don’t code for every feature
○ Outsource undifferentiated heavy-lifting
● Always Monitor your Cost and Usage
○ Think like a Startup
○ Experiment and Learn
https://acloudguru.com/blog/engineering/aws-lambda-is-winning-but-first-it-had-to-die
18. Normal Web Application needs...
● Web Server
● Application Server
● Authentication
● Database
● Storage
● Outbound Communication
* Many of these are applicable to non-web applications as well.
19. Normal Web Application needs...
Required
● Web Server
● Application Server
● Authentication
● Database
● Storage
● Outbound Communication
Optional
● Security
● Scaling
● High Availability
● Cost effective
20. AWS Web Application
Amazon S3
Web Server
Amazon EC2
● Need virtual machine for
HTML/CSS/JS?
● Data Transfer Out is PAID
● Additional ops like OS task, libraries,
security, change rollout, etc
● Supports static web hosting
● Highly scalable
● Serverless and Cost-effective
● No additional maintenance
● Can also host Images, Videos, Audios,
etc
21. AWS Web Application
Application Server
Amazon EC2
● Need virtual machine 24x7?
● What kind of configuration required?
● What happens if usage increases or
no usage at all!
● Additional ops like OS task, libraries,
security, change rollout, etc
● API Gateway and Lambda both are
event-driven and serverless
● Both can scale from 0 to thousands
without any additional effort
● No additional maintenance
● API Gateway supports HTTP, REST
and Web Socket
● Lambda supports Nodejs, Python,
Ruby, Java, Go, C#, and Containers
API Gateway AWS Lambda
22. AWS Web Application
Amazon Cognito
User Authentication
Custom Code
● Why should we write the User
Authentication logic at all!!!
● Fully-managed User Authentication
Service
● Signup, Sign In, MFA, Password
policy, etc
● 50K Active Monthly Users are FREE
● UI can be customized
● Supports Event Triggers to run
custom code with Lambda functions
23. AWS Web Application
Amazon RDS
Database
Amazon EC2
● Install and maintain the database in
virtual machine
● Configuration dilemma, CPU, RAM,
Storage!!!
● Cost for 24x7
● Who will manage Backup,
Monitoring, Scaling and Security?
● SQL Database Services
● RDS and Aurora both are managed
services
● Can scale horizontally and vertically
with minimal effort
● Backup, Monitoring and Security
features are Built-in
● These are charged for 24x7
Amazon Aurora
24. AWS Web Application
Amazon RDS
Serverless vs Managed Database
Amazon DynamoDB
● DynamoDB is serverless NoSQL
Database
● Pay only for Storage and Query
● Scale from 0 to Petabytes in storage
● Aurora Serverless is a serverless SQL
database
● Designed for infrequent access
● SQL Database Services
● RDS and Aurora both are managed
services
● Can scale horizontally and vertically
with minimal effort
● Backup, Monitoring and Security
features are Built-in
Amazon Aurora
Amazon Aurora
Serverless
25. AWS Web Application
Amazon S3
File Storage
Amazon EC2 Disk
● VM attached storage is good for
frequent read/write
● Manual ops to manage scaling,
unwanted files, backup, etc
● Can’t access directly, need compute
to access the stored files
● Fully-managed, Serverless, Scalable,
Web Storage service
● Supports different tiers to align the
storage based on the requirements
● Security and Access can be tailored
based on the requirements
31. Event-Driven Architecture
In Event-Driven Architecture events are emitted and consumed. Almost all of
the AWS services emit events:
● Amazon Cognito can emit Auth-related Events
● API Gateway can emit HTTP request events
● Lambda can emit Success/Failure events
● S3 can emit file operation events
● DynamoDB can emit the record operation events
32. What about Optional targets
● Security
○ Managed / Serverless services has limited accessibility
○ You can’t SSH into Lambda, API Gateway or S3
● Scaling
○ Serverless natively comes with Auto Scaling
● High Availability
○ Serverless services are designed for high availability
● Cost effective
○ Serverless follows Pay for Consumption model
○ Pay for API Calls
○ Pay for Lambda execution time per request
○ Pay for Storage used
37. How to Monitor if Everything is Serverless
● Managed or Serverless services are designed with abstraction
● Little or no visibility of the underlying infrastructure
● AWS provides other services like CloudWatch to check what is going on
inside these services and how our code runs
Amazon CloudWatch
Alarm Rule Event
(time-based)
Event
(event-based)
Logs
38. How to Control if Everything is Distributed
● Building and linking functions are EASY, controlling these functions at scale
is HARD
● AWS Step Functions helps to orchestrate a controlling logic to run and
monitor the execution flow
39.
40. Let’s see a fully Serverless Web App that helps to Store Files Securely
Demo
https://github.com/AppGambitStudio/serverless-docs
41. ● Use Serverless Framework or SAM for Serverless Application Development
● Use CodeCommit, CodeBuild and CodePipeline for the CI/CD
● Use CloudWatch for Logging and Monitoring
● Use X-Ray for tracing errors and performance issues
● Use AWS Budgets to configure expected budgets and alerts
AWS Dev Tools
42. ● AWS has service(s) for every possible use case
● Cloud is powerful but use it wisely and only as much as you need
● Own less and Build more
● Serverless technologies are mature and powerful now
● Event-driven systems can “evolve” easily
● Experiment and Learn
Wrap Up
No server is easier to manage than “no server”
- Werner Vogels, Amazon.com CTO
43. ● Serverless Application Architecture
https://docs.aws.amazon.com/whitepapers/latest/serverless-multi-tier-architectures-
api-gateway-lambda/welcome.html
● iRobot Case Study https://aws.amazon.com/solutions/case-studies/irobot-iot/
● SQQUID 100% Serverless Case Study
https://www.serverless.com/blog/sqquid-one-hundred-percent-serverless
● Building An Infinitely Scalable Online Recording Campaign For David Guetta & UEFA
https://www.serverless.com/blog/introducing-serverless-partners-meet-parallax
● Serverless Examples by Use case
https://www.simform.com/serverless-examples-aws-lambda-use-cases/
Other references
46. focus, focus, focus—and focus specifically on the single thing
you’re going to be better at than everyone else.
That is your competitive edge. Build a great product, listen to
users, and repeat.
Outsource everything else - especially your infrastructure.
https://increment.com/cloud/why-startups-should-run-on-cloud-providers/
The takeaway is...