Using AWS as an Application Development Framework

In this article, we are going to discuss about How we can use AWS as an Application Development Framework when developing Serverless E-Commerce application.

Serverless Event-driven E-commerce Microservices Architecture

At the end of the article we will be design the Reference architecture above which is a Real-world Serverless E-commerce application.

Step by Step Design AWS Architectures w/ Course

I have just published a new course — AWS Serverless Microservices with Patterns & Best Practices.

In this course, we’re going to learn how to Design and Develop AWS Serverless Event-driven Microservices with using AWS Lambda, AWS DynamoDB, AWS API Gateway, AWS EventBridge, AWS SQS, AWS CDK for IaCInfrastructure as Code tool and AWS CloudWatch for monitoring.

Source Code

Get the Source Code from Serverless Microservices GitHub — Clone or fork this repository, if you like don’t forget the star. If you find or ask anything you can directly open issue on repository.

AWS is a Cloud Provider

As you know that we know AWS is a cloud provider that provide infrastructure to our applications. So AWS is a platform service that provide to virtualize our servers, infrastructures and databases requirements.

But when we looking AWS Serverless services it seems AWS is not only infrastructure provider, instead its becoming as an Application Development Framework.

Before we start, we should understand what is Application Development Framework.

What is Application Development Framework ?

Application Development Framework is a set of code that is responsible for calling your actual business logic based on its defined architecture.

So basically an Application Development Framework provides

  • to create RESTful APIs with underlying web application
  • to connect databases with ORM tools
  • to provide centralized logging features
  • to provide Identity Management
  • to collect and visualize monitoring and metrics
  • to facilize to connect 3rd party services like Kafka, Redis, RabbitMQ so on..
https://spring.io/microservices

It provides all those features in order to focus on actual business logic.
So we can think Java Spring Boot or .Net ecosystem as an Application Development Framework.

You can see the image above which is the Spring Boot microservice application that Spring Boot as an Application Development Framework and it provides to handle all these logging, monitoring, configurations, connections and so on.

But you have to develop all those stuff by yourself into for all your applications.

AWS as an Application Development Framework

But now all these features already provided by AWS Serverless Services without thinking scalability, availability issues and no configuration code requirement.

Serverless applications are built-in availability and fault tolerance. There is no need extra architecture for high availability and high scalability designs, these features comes from the beginning.

This is important because exceptions can happen anytime, so reliable and resilience architecture are crucial when you running business so Serverless provide this from the beginning. Think to design multi-cluster applications from scratch, it will really costly and unpredictable results. So Serverless handle all automatically.

https://docs.aws.amazon.com/whitepapers/latest/microservices-on-aws/api-implementation.html

So we can focus on building actual business logic and no worry about about periphery requirements like database connections, logging, monitoring and so on.

So Serverless applications have built-in service integrations, more than 200 services easy to integrate each other to provide value of business and automatically scale from zero to peak demands, you can adapt to customer needs faster than ever. So you can focus on building your application instead of configuring it.

That means AWS has overwhelming advantage when we compare with other Application Development Frameworks.

Evolution of Cloud Infrastructures

Lets look at the Evolution of AWS infrastructure development and services in the last decades. But before that I would like to show you Evolution of Cloud Infrastructures.

Here you can find the evolution from IaaS to FaaS;

https://serverless.zone/abstracting-the-back-end-with-faas-e5e80e837362

Infrastructure as a Service (IaaS):

We can think of it as renting a computer through a cloud provider. Here, it means that all control, including the operating system level, is yours. Example services: Amazon EC2, Azure VMs.

Container as a Service (CaaS):

We can say that the cloud provider puts another level of abstraction here so that you can easily manage your containers. If you use Amazon EC2 Container Service (ECS) as an example, Amazon will be managing your docker containers for you. Example services: Docker Cloud, Amazon ECS

Platform as a Service (PaaS):

We can call PaaS services to managed services. What you will be interested in PaaS services is to upload your program after choosing the language/framework in which your program will run.

Here, the service provider takes care of many operational tasks for you, but you still run, for example, the Spring Boot application we know.

You have to make and manage many configurations required for your application. Even if the service will automatically open a new server when there is a sudden load (again, some configuration will be required), it will take time for your application to stand up.

In fact, we can say that the way of our application works is the biggest change between PaaS and FaaS. While PaaS applications are working as we are used to that is, the application runs and continues to do its job until a new version comes, FaaS applications run as a result of an incoming event and our application closes after the function finishes its work.
By event I mean here, for example, it can be an HTTP request, it can be called periodically or if we think for AWS, it can work with events from many other services of AWS (S3, Kinesis, DynamoDB Streams…). Example PaaS services: Heroku, Amazon Elastic Beanstalk.

Functions as a Service (Faas) — Serverless:

If you run your application on a Serverless service, you have to switch to an event driven architecture that I mentioned before.

Switching to a Serverless architecture makes many issues such as scaling of the application, deployment, operating system or programming language updates not entirely our problem after you write and upload your code, or make it much easier.

This means assign your problems to AWS problems.

Evolution of AWS Infrastructure

Lets look at the Evolution of AWS infrastructure development and services in the last decades.

Evolution of AWS Infrastructure

2000s — Java / .Net

In 2000s, There are only 2 type of developer; .NET or Java developer.

In 2000s, the main problem of Amazon is solving “flexible” infrastructure for companies. Infrastructure provisioning was a really hard to do, so AWS focusing on creating infrastructure virtually on the cloud with reducing complexity for enterprises companies.

So that time, application development frameworks were primarily for enterprises companies like Oracle and Microsoft development environments are Java with J2EE and C# with .Net ecosystem. Of course I am talking about enterprise software applications.

So Application development and infrastructure development were totally separate from each other and no any interaction between application development and infrastructure development.

2010s — Rails/ Django / Spring Boot

In 2010s, There are new frameworks comes like Ruby on Rails or Python Django Developer, and also Java has Spring Boot and .net has asp.net
for Application development framework.

In the 2010s, AWS had mature to create and manage infrastructure on the cloud. And AWS is started to providing platform capabilities in order to be PAAS -(platform as a service) company. So when designing an application, solution architects start to design infrastructure on cloud with creating EC2 machines, adding S3 storages and so on.
After that application code deployed on top of that infrastructure. But application development was still dependent on application frameworks such as Ruby on Rails, Spring boot so on. As a Cloud provider, AWS is accelerated development, but still not central to development.

2015s — Containers / Microservices

In 2015s, The software architectures becomes containerized cloud-native microservice architectures and there becomes infrastructure development frameworks like docker for container management Kubernetes for container orchestration.

During these times, AWS provides provide set of services for cloud-native microservice architectures like

  • ACR — Amazon Container Registry for docker containers
  • EKS — Elastic Kubernetes Services

These are manages services, also AWS create its own container management services

  • Amazon Fargate — for Serverless container management

Also there are new companies for standardizing and automating application deployment, like Terraform, standardizing application deployment on such infrastructure using Docker.

So during 2015s, still infrastructure and application development are separated. Infrastructure development performs by the Devops engineers with automation ci/cd pipelines, shipping application over containers and automate the whole process with IaC.

2020s — AWS Serverless Services

In 2020s, The software architectures becomes hybrid with cloud-native architectures or becomes fully Serverless architectures.

So nowadays, there is a new developer titles looking for enterprise companies
whichs are;

  • AWS Developer
  • AWS Solutions Architects

Today in the 2020s, AWS has very powerful Serverless services
that you can create infrastructure and develop application very fast and fully included all features of application development framework.

Also AWS Serverless comes with more powerful features from application development frameworks which's are Automatic Scaling that means, your application goes zero to millions instantly without needed any configuration
and its high availability, durable, resilience, multi-region application
so these are the AWS overwhelming advantage when we compare with other Application Development Frameworks.

So that means, In 2020s, AWS is becoming a technology stack that covers all aspects of traditional application frameworks. AWS provide a Serverless ecosystem that provides you unique value propositions over the platform capabilities. AWS provide services that solve lots of software design problems like queue, messaging, application integration, identity, and so on. So you can focus on business logic.

AWS handles all of non-functional requirements such as scalability, availability, logging, monitoring, infrastructure management, patching, so on.

AWS defines its Serverless services as “the native architecture of the cloud that enables you to shift more of your operational responsibilities to AWS, increasing your agility and innovation.”

You can think when using AWS, you will be vendor lock-in, but I would prefer to use AWS instead of depending on language-centric frameworks.

I think I convince you that AWS is an Application Development Framework. So let’s develop our enterprise E-Commerce application with fully Serverless Event-driven Microservices Architecture.

AWS Serverless Microservices for Ecommerce Application Architecture

Here you can find the main overall Serverless Architecture for our application. This is the big picture of what we are going to develop together for AWS Serverless Event-driven E-commerce Microservices application that is Step by Step Implementation together.

Serverless Event-driven E-commerce Microservices Architecture

We will be following the reference architecture above which is a real-world Serverless E-commerce application and it includes;

  • REST API and CRUD endpoints with using AWS Lambda, API Gateway
  • Data persistence with using AWS DynamoDB
  • Decouple microservices with events using AWS EventBridge
  • Message Queues for cross-service communication using AWS SQS
  • Cloud stack development with IaC using AWS CloudFormation CDK

Step by Step Design AWS Architectures w/ Course

I have just published a new course — AWS Serverless Microservices with Patterns & Best Practices.

In this course, we’re going to learn how to Design and Develop AWS Serverless Event-driven Microservices with using AWS Lambda, AWS DynamoDB, AWS API Gateway, AWS EventBridge, AWS SQS, AWS CDK for IaCInfrastructure as Code tool and AWS CloudWatch for monitoring.

Source Code

Get the Source Code from Serverless Microservices GitHub — Clone or fork this repository, if you like don’t forget the star. If you find or ask anything you can directly open issue on repository.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mehmet Ozkaya

Mehmet Ozkaya

Software/Solutions Architect, Udemy Instructor, Working on Cloud-Native and Serverless Event-driven Microservices Architectures https://github.com/mehmetozkaya