AWS has a lot of different instance types and it can be difficult to decide which instance type would be the best for a particular use-case. In this article, we will compare three of the most popular instance types (M5, R5 and C5) AWS offers across various dimensions such as their specs, their performance as well the cost.
Amazon’s compute-intensive C5 instance family has multiple instance types which can make it difficult to choose the right instance type for your use-case.
In this post, we will look at the differences between the C5, C5d and C5n instance types.
AWS recently launched Fargate which lets users build and deploy containerized applications without having to manage the underlying servers themselves. Previously, if you wanted to deploy a container on AWS, you would have to first provision a cluster and then deploy your container onto that cluster. This can add a lot of friction as a lot of developers want to be able to deploy their applications as quickly as possible without worrying about the underlying infrastructure.
Fargate makes deploying your containerized applications pretty easy and straightforward.
In this tutorial, we will create a Python web application using Flask and deploy it using Fargate.
If you are interested in learning about how Fargate works internally and how it compares to other AWS services, check out our new blog post here.
virtualenv: Virtualenv is a tool to create isolated python environments. We will be using it to create an isolated environment for our application. Instructions for installation are available here.
Docker: We will be using Docker to containerize our python application. More information about Docker is available here.
News API: Since we will be building a simple news aggregator application, we need an API from where we can get the data. News API has a free developer tier which you can sign up for and get an API key. You can sign up by visiting this link.
One of the benefits of using a cloud provider like AWS is the ease of spinning up resources such as a new EC2 instance or storing more data in S3. As developers, we are generally more focused on getting our product or feature to the users as quickly as possible. However, we generally don’t think about costs until we see the bill at the end of the month and are left wondering how we ended up spending so much money.
In this article, we will look at the different ways available to monitor and reduce your bill significantly.
Extensive monitoring is essential for reducing your costs and keeping them low in the future. Amazon provides a few tools to track your costs easily and accurately:
Cost Explorer: This is a tool which lets you view your costs easily. The tool shows historical data so that you can see how your cost is changing over time. The cost explorer also lets you filter based on a bunch of criteria such as the service, the region etc. More information about how to use the Cost Explorer is available here.
Use Tags everywhere: A tag is a label that can be assigned to any AWS resource. Tags can be used to organize your resources and can help in tracking costs in more detail. For example, if you wanted to know the cost of a particular feature or service, you could add tags to all the resources being used by that service and the cost report will be able to show you the cost for that service. More information about how to use tags for tracking cost is available here.
Create billing alerts: An important component of any good monitoring system is being able to alert based on certain conditions. AWS lets you create billing alerts that send notifications when the usage exceeds the defined thresholds. More information about how to create alerts is available here.
Once you start monitoring your costs, you should have a much better idea about which services and resources are the most expensive and what you want to optimize.
Let’s look at how to reduce the cost for some of the more popular AWS services.
Amazon recently introduced the next generation of their compute-optimized instances: EC2 C5 instances. Compute instances are well suited to compute-heavy workloads such as batch processing, distributed analytics, high-performance computing etc.
If you are considering whether you should migrate your workload from the previous generation instance families to C5, then the next couple of sections should help with the decision.
What’s new in C5?
The C5 instances are powered by the Skylake processor from Intel. The Skylake processor has several improvements over the Haswell processor which is used in the C4 instance family.
Amazon has also introduced a new instance type for the C5 instance family, c5.18xlarge, which provides 72 vCPUs and 144 GB of memory. There is no comparable instance type in any of the previous instance families.
Comparing C4 and C5 instances
Let’s take a closer look at the differences between the two instance families.