SlideShare a Scribd company logo
How to avoid going crazy
when composing
serverless applications?
Rafał Gołubowicz
Rafał Gołubowicz
- Senior Node.js Developer in The Software House
- Experience with plenty of Backend and Frontend
technologies
- fan of cloud solutions (AWS Certification soon ^^)
- enthusiast of new technologies and simple,
unconventional solutions
- speaker, trainer, mentor
- loves travels, robotics, good books, ukulele and
whisky
Serverless? What's all that noise about?
Serverless architecture is a way to
build and run applications and
services without having to manage
infrastructure. Application still runs
on servers, but all the server
management is done by provider.
You no longer have to provision,
scale, and maintain servers to run
your applications, databases, and
storage systems.
Source: https://www.ebcgroup.co.uk/news-insights/on-premises-vs-cloud
How it works?
1. The developers write a function.
2. The developers define an event. (ex. HTTP - GET
method)
3. The developers can define authorizers. (ex. JWT)
4. The event gets triggered.
5. The server authenticates API request (if added).
6. The function gets executed.
7. The result gets sent to the user.
Why should we use it?
- reduced costs - no need to run 24/7 server,
charge only for the time the function was
running.
- great scalability
- easier to introduce new features
- quick deployment
- less effort for infrastructure maintenance
Serverless - use cases
● processing images,
● triggering actions based on various events,
● backend API,
● asynchronous jobs,
● scheduled tasks,
● notifications,
● advanced business workflows
AWS (Amazon Web Services) is a cloud service provider
that offers various computing services that are
accessible over the public internet.
AWS manage and maintain hardware and infrastructure,
saving organizations and individuals the cost and
complexity of purchasing and running resources on site.
These resources may be accessed for free or on a
pay-per-use basis.
Presentation is based on the AWS solutions.
AWS Serverless
Sample business
process
I want to increase my
credit limit!
Clients ask to increase
credit limit
Increase credit line process
1 2
Bank reviews client
income and history
● Fill out the application form ● Verify the application
● Determine the creditworthiness
● Check credit history
● Increase the credit limit
● Send decision to the client
3
Client got a decision
● Receive a decision
Do we need an
architecture diagram?
YES.
Architecture diagram advantages
● makes it easy to discuss architecture by the team,
● better understanding system for anyone involved in the project
(including non-technicals),
● helps developers while creating,
● easier to onboard new developers.
Jak nie zwariować z architekturą Serverless?
AWS Console
Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?
AWS Console
- set up other services,
- set up IAM policies,
- set up VPC,
- test functions on the AWS console.
- And… remove everything manually (if needed) :-)
Serverless
framework
Serverless Framework
Serverless Framework is open source software that
builds, compiles, and packages code for serverless
deployment, and then deploys the package to the cloud.
Serverless Framework helps with development by
emulating the Lambda environment. Thanks to many
external plugins, it could emulate plenty of serverless
services (like AWS Step Functions, AWS API Gateway,
etc..). Developer is able to test the each part of
application before deploying it to the cloud.
Infrastructure as Code
Infrastructure as Code (IAC) is a way to manage
services and networks using code instead of
manual work. This means that instead of setting
up everything by clicking on AWS Console, you
can write the code that describes how the
system should be set up and then use tools to
automatically configure the system based on
that definition. This makes it faster and easier to
set up and manage computer systems, and also
makes it easier to work together as a team.
Serverless framework configuration - header
Serverless framework configuration - provider
Serverless framework configuration - Lambda functions
Serverless framework configuration - Step Function
Serverless framework configuration - workflow definition
Jak nie zwariować z architekturą Serverless?
Serverless framework
deployment
sls deploy —stage=dev
sls deploy function -f verifyApplication
Composing Serverless Framework services
Serverless Framework
And it’s just a chunk of
possibilities with serverless
framework offers….
AWS SAM
+
App Composer
AWS Serverless Application Model
AWS App Composer is a new low-code tool for
visually designing and building serverless
applications. It was announced at the re:Invent
conference in December 2022. The service
provides developers with a visual canvas and a
simple drag and drop interface to create
serverless architecture, connect resources and
design the functions.
AWS Application Composer
AWS Application Composer - build infrastructure
AWS Application Composer - generated CF
AWS Application Composer - issues
● lack of AWS services
● duplication of sections in CloudFormation
● missing important configuration
● making mess in local project
● for the rest of issues check out my latest post on TSH.io/blog
Jak nie zwariować z architekturą Serverless?
AWS Console Serverless Framework AWS App Composer + AWS SAM
- only AWS
- development by managing resources in the
dashboard
- doesn’t support TS
- visual designers for SFN; process can be
made by drag and drop; no need to know
CloudFormation
- needs to remove everything manually
- supports multi providers
- regular development, most of features can be
tested locally
- supports TS
- a little familiarity with AWS CloudFormation or
AWS resources (to know properties/settings)
- 1 command to deploy or remove everything
- used by many companies;
- only AWS
- regular development, most of features can be
tested locally
- supports TS
- visual designer, can be connected with local
environment; no need to know CloudFormation
- 1 command to deploy or remove everything
- AWS App Composer is a preview feature
Jak nie zwariować z architekturą Serverless?
tsh.io
Thanks for your attention!
Rafał Gołubowicz
Senior Node.js Developer

More Related Content

Jak nie zwariować z architekturą Serverless?

  • 1. How to avoid going crazy when composing serverless applications? Rafał Gołubowicz
  • 2. Rafał Gołubowicz - Senior Node.js Developer in The Software House - Experience with plenty of Backend and Frontend technologies - fan of cloud solutions (AWS Certification soon ^^) - enthusiast of new technologies and simple, unconventional solutions - speaker, trainer, mentor - loves travels, robotics, good books, ukulele and whisky
  • 3. Serverless? What's all that noise about? Serverless architecture is a way to build and run applications and services without having to manage infrastructure. Application still runs on servers, but all the server management is done by provider. You no longer have to provision, scale, and maintain servers to run your applications, databases, and storage systems. Source: https://www.ebcgroup.co.uk/news-insights/on-premises-vs-cloud
  • 4. How it works? 1. The developers write a function. 2. The developers define an event. (ex. HTTP - GET method) 3. The developers can define authorizers. (ex. JWT) 4. The event gets triggered. 5. The server authenticates API request (if added). 6. The function gets executed. 7. The result gets sent to the user.
  • 5. Why should we use it? - reduced costs - no need to run 24/7 server, charge only for the time the function was running. - great scalability - easier to introduce new features - quick deployment - less effort for infrastructure maintenance
  • 6. Serverless - use cases ● processing images, ● triggering actions based on various events, ● backend API, ● asynchronous jobs, ● scheduled tasks, ● notifications, ● advanced business workflows
  • 7. AWS (Amazon Web Services) is a cloud service provider that offers various computing services that are accessible over the public internet. AWS manage and maintain hardware and infrastructure, saving organizations and individuals the cost and complexity of purchasing and running resources on site. These resources may be accessed for free or on a pay-per-use basis. Presentation is based on the AWS solutions. AWS Serverless
  • 9. I want to increase my credit limit!
  • 10. Clients ask to increase credit limit Increase credit line process 1 2 Bank reviews client income and history ● Fill out the application form ● Verify the application ● Determine the creditworthiness ● Check credit history ● Increase the credit limit ● Send decision to the client 3 Client got a decision ● Receive a decision
  • 11. Do we need an architecture diagram?
  • 12. YES.
  • 13. Architecture diagram advantages ● makes it easy to discuss architecture by the team, ● better understanding system for anyone involved in the project (including non-technicals), ● helps developers while creating, ● easier to onboard new developers.
  • 20. AWS Console - set up other services, - set up IAM policies, - set up VPC, - test functions on the AWS console. - And… remove everything manually (if needed) :-)
  • 22. Serverless Framework Serverless Framework is open source software that builds, compiles, and packages code for serverless deployment, and then deploys the package to the cloud. Serverless Framework helps with development by emulating the Lambda environment. Thanks to many external plugins, it could emulate plenty of serverless services (like AWS Step Functions, AWS API Gateway, etc..). Developer is able to test the each part of application before deploying it to the cloud.
  • 23. Infrastructure as Code Infrastructure as Code (IAC) is a way to manage services and networks using code instead of manual work. This means that instead of setting up everything by clicking on AWS Console, you can write the code that describes how the system should be set up and then use tools to automatically configure the system based on that definition. This makes it faster and easier to set up and manage computer systems, and also makes it easier to work together as a team.
  • 28. Serverless framework configuration - workflow definition
  • 32. sls deploy function -f verifyApplication
  • 34. Serverless Framework And it’s just a chunk of possibilities with serverless framework offers….
  • 37. AWS App Composer is a new low-code tool for visually designing and building serverless applications. It was announced at the re:Invent conference in December 2022. The service provides developers with a visual canvas and a simple drag and drop interface to create serverless architecture, connect resources and design the functions. AWS Application Composer
  • 38. AWS Application Composer - build infrastructure
  • 39. AWS Application Composer - generated CF
  • 40. AWS Application Composer - issues ● lack of AWS services ● duplication of sections in CloudFormation ● missing important configuration ● making mess in local project ● for the rest of issues check out my latest post on TSH.io/blog
  • 42. AWS Console Serverless Framework AWS App Composer + AWS SAM - only AWS - development by managing resources in the dashboard - doesn’t support TS - visual designers for SFN; process can be made by drag and drop; no need to know CloudFormation - needs to remove everything manually - supports multi providers - regular development, most of features can be tested locally - supports TS - a little familiarity with AWS CloudFormation or AWS resources (to know properties/settings) - 1 command to deploy or remove everything - used by many companies; - only AWS - regular development, most of features can be tested locally - supports TS - visual designer, can be connected with local environment; no need to know CloudFormation - 1 command to deploy or remove everything - AWS App Composer is a preview feature
  • 44. tsh.io Thanks for your attention! Rafał Gołubowicz Senior Node.js Developer