AWS Cost Management with AWS Free Tier

In this article, we are going to talk about AWS Cost Management with AWS Free Tier Account when developing Serverless E-Commerce application.

AWS Cost Management with AWS Free Tier

If you followed the other articles, you can see that, we deployed full Serverless E-commerce application services on AWS Serverless cloud environment.
And these services are mostly free services with the Free Tier account, but it needs to manage to stay in Free Tier account limits.

So How can we stay in Free Tier Account limits when you are developing a Serverless E-Commerce project ?

Let me start with remembering our 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 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 E-commerce application

We have followed 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

How can we stay in Free Tier Account ?

When I developed this project, AWS didn’t charge me any amount of money from AWS with Free Tier account. So if we follow the Free tier, you don’t get charged. But you should consider and careful that these are paid services that can comes with cost.

Let me show my billing results. Here is my Cost and Usage for our Serverless E-commerce application, as you can see that I didn’t changed any amount of cost for my usages.

AWS Cost Management with AWS Free Tier

Free Tier Usage of Serverless E-Commerce Application

And here is my free tier usage of AWS Services. As you can see that I have send lots of request to the AWS services when preparing this project and all these services has zero cost of me with the AWS Free Tier.

AWS Usage During the Project Development

See that I have almost 300 request usage for AWS Lambda, 200 request for AWS SQS. And these are spending very low amount of limits. You can also see here AWS Free Tier usage limits under the second column.

You can also see this detail into “AWS Cost Management” module, you can access from your dashboard page. But you should login with root user. Only root user can see these details.

AWS Free Tier Account Limits

You can see AWS Free Account Limits from the official website.

See AWS Free Tier Account Limits

As you can see that we opened AWS Free Tier page.

With these Free Tier Account, we can use more than 100 products for building applications. And most of the services allowed good amount of usage depending on the product. But I can say that this free tier account is really really sufficient to develop something like average applications on AWS.

Free Tier details

We can see details of free services on the above picture.
For example filter to “Always Free

See that;

  • 25 GB DynamoDb
  • 1 million Lambda request
  • 1 TB Amazon CloudFront
    and so on

So these are good amount of numbers that you can create your own startup applications with this free tier and AWS power of high scalability and high availability.

Turn off the lights before leaving the room

Now we come to the part where we have to be careful. Now we can talk about to be careful when developing our Serverless E-commerce project.

I always clear resources after finish the section or leave from computer.

At this stage, I would like to emphasizes the quote from AWS CTO Werner Vogels about cloud usages and global warming;

Turn off the lights before leaving the room

https://www.youtube.com/watch?v=8_Xs8Ik0h1w

So you can think that if you leave from computer and shut the light off, that means you also shut down the AWS resource.

He is saying this for the un-used resources on the cloud, but from our course perspective, we can also follow this quote.

Because we don’t need to stay live on production. You can think that we are going to prepare demo session with your customer and you should show the Serverless application during the customer presentation.
After that we shut-down resources since new customer session arranged. Please consider this, clear all resources after you finished the work at that day.

Serverless E-commerce application provisioned by AWS CDK

Don’t worry, when you come back tomorrow, we can instantly come the same situation with the power of AWS CDK.
When you run
cdk deploy
command, this will immediately provision all resources where you left.

As the same way you can clear all resources with running

cdk destroy

command, this will immediately clear all resources.

Within our application architecture, you’ll learn how to design and developing AWS Event-driven microservices with using Serverless patterns and best practices. You can find the final application in GitHub at the repository below.

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