Unexpected AWS costs can derail your runway. Boost your startup application.

In the times where we embrace building reliable and fast systems, but as a startup your days filled with competing priorities. You want to focus on innovation, building business, reducing costs, going agile —not worrying about underlying infrastructure or unexpected costs. The cloud management firm Right Scale estimates that wasted cloud spend averages about 35%, with small and medium-sized companies overspending the most.

I get you my friend, i have been there when i was building out my first startup. Not even knowing what cloud is, CPanels' were more famous at that time. With this in mind, i’ve created this how-to guide to make sure your startup doesn’t end up spending thousands of dollars due to a spike that could have been prevented through monitoring or an alarm. We’ll cover best practices for new and existing AWS accounts when it comes to fundamental security, monitoring, and cost management.

We'll also look into little details when it comes to monitor sudden increase and decrease in usage of services due to misconfiguration. By following these four recommendations, you can extend your runway and create a long-term strategy for cost management.

1. Breaking down AWS costs

As an early stage startup, understanding your expenses in order to come up with a pricing model is a priority. AWS Cost Explorer allows you to filter your spend according to User-Defined Cost Allocation Tags. For tags to appear on your billing reports, you must activate your applied tags in the Billing and Cost Management console. It can take up to 24 hours for the tags to appear in the console. Follow the instructions here to activate the tags you created and applied to your resources. In the screenshot below, we are filtering all resources that have a project tag with the value “flask-api.” Breaking down costs in this manner helps you quickly validate pricing models as you test different prototypes.

Article content

2. Setting up automation

The AWS Instance Scheduler is an AWS solution that enables customers to configure custom start and stop schedules for their Amazon EC2 and Amazon RDS instances. The solution is easy to deploy and can help reduce operational costs for both development and production environments. Customers who use this solution to run instances during regular business hours can save up to 70% compared to running those instances 24 hours a day.

One thing to keep in mind when using the AWS Instance Scheduler is that you’ll be deploying infrastructure to manage infrastructure. The resources being deployed are all serverless and will scale down to zero when not in use, which is the best cost-optimization technique.

The AWS Instance Scheduler also uses tags to filter which instances you want to control. During the initial configuration of the Instance Scheduler, you define a tag to identify the Amazon EC2 and Amazon RDS instances that you want to stop and start on a schedule you define. When you create a schedule, the name you specify is used as the tag value that identifies the schedule you want to apply to the tagged resource. For example, a user might use the solution’s default tag name “Schedule” and create a schedule called “uk-office-hours.” To identify an instance that will use the “uk-office-hours” schedule, the user adds the Schedule tag key with a value of “uk-office-hours.” Tags can be applied to multiple resources using the AWS Tag Editor.

3. Securing your account and workloads

The principle of least privileges is a security principle that entails granting only the permissions through Identity and Access Management (IAM) required to complete a task. Prohibiting unauthorized use of services allows you to more closely control access to your AWS Account and may prevent unauthorized charges. To do this, you’ll need to decide which users or applications will perform a specific task and the exact permissions needed to complete it. For instance, under the principle of least privileges, Business Intelligence analysts would only be granted the access to analytics services, such as Amazon QuickSight and Amazon Athena.

a. Regularly rotating access keys is another way to prevent extraneous charges. Make sure that all of your account users—including yourself—regularly change their passwords. This will limit both the amount of time a compromised credential can affect your startup and ensure that users will not be able to access resources after they’ve left the company.

b. Set up a multi-account AWS environment with AWS Organizations. This free AWS service will allow you to set up separate development and production accounts. As your workload grows and becomes more complex, you can remain flexible when it comes to billing, security controls, and budget requirements. We recommend dividing your workloads into production, testing, and development environments to more easily determine your operational costs, based on the regulatory and budget needs of your startup. This may also protect your production environment from unauthorized testing, which could lead to downtime or configuration errors.

4. Monitoring cost and usage

Use AWS Budgets to set up daily budgets and alerts. Daily—as opposed to monthly or weekly—granularity will alert you to upticks in charges via email and SNS. Daily alerts are especially useful if services are provisioned over the weekend. Daily alerts also allow you to manage resources appropriately, correct any misconfigurations before too much time has passed, and prevent unpleasant surprises at the end of the month.

Use AWS Cost Anomaly Detection to detect anomalous usage of services automatically. AWS Cost Anomaly Detection is effective in part because it’s customizable. By segmenting spends—for instance, tracking AWS Lambda and Amazon Simple Storage Service (Amazon S3) separately—you get fewer false alerts. You can also choose the level of granularity used to analyze spending. One customer noticed a 50% uptick in Amazon CloudWatch spend and was able to quickly get in touch with their AWS team and better understand their usage of services.

Use AWS CloudTrail to set alerts for service usage. AWS CloudTrail is an easy-to-use tool that allows customers to review account activity and categorize it into “events”—essentially keeping a record of all related activity, which can help when troubleshooting the root cause of anomalous costs. For example, a user may have unauthorized access to a service and using AWS CloudTrail, you would be able to determine who, when and at what time the event occurred.

Use Amazon CloudWatch to set monitoring alerts for high usage. Through Amazon CloudWatch, you can enable billing alerts, create billing alarms, and receive SNS notifications when spending exceeds your threshold. Another benefit to Amazon CloudWatch is monitoring usage patterns over time and setting alerts, giving much-needed data when it comes to forecasting trends and optimizing spending going forward.

5. AWS instance types

AWS has more than 600 instance types, exceeding any other cloud provider. Each instance type provides a choice of processor, storage, networking, and operating system, so you can choose the instance configuration that best fits your startup-specific workload. And each instance type includes one or more instance sizes, allowing you to scale your resources to the requirements of your target workload. AWS gives you the flexibility to change your instance type as quickly as your needs change, eliminating overhead costs for unused resources.

Amazon EC2 instances fall into 6 categories:

a. General purpose - Most popular instances provide a balance of CPU, memory, and network resources and are ideal for running web servers, containerized microservices, caching fleets, and development environments.

b. Compute optimized - Good for compute-intensive, CPU-bound, demanding applications, such as frontend fleets for high-traffic websites, on-demand batch processing, distributed analytics, video encoding, dedicated gaming servers, and high-performance science and engineering applications. These instances offer the highest ratio of virtual CPUs to memory than the other families and the lowest cost-per-virtual CPU of all the EC2 instance types.

c. Memory optimized - These instances are ideal for memory-intensive applications, such as real-time big data analytics, in-memory databases, enterpriseclass applications that require significant memory resources, or general analytics, such as Hadoop or Spark.

d. Accelerated computing - Instances in this category include additional accelerators and GPUs, FPGAs, and machine learning (ML) chips that provide massive amounts of parallel processing for tasks such as graphics processing, ML training, ML inference, and high performance computing (HPC).

e. Storage optimized - Ideal for tasks requiring local access to very large amounts of storage, extreme storage performance, or both. Instances are available that include both large-capacity HDD and extreme lowlatency local NVMe SSDs.

f. HPC optimized - HPC instances are purpose-built to offer the best price performance for running HPC workloads at scale on AWS. HPC instances are ideal for applications that benefit from highperformance processors, such as large, complex simulations and deep learning workloads.

Amazon EC2 provides resizable compute capacity in the cloud. It’s designed to make web-scale cloud computing easier for developers. After discussing instance types, here are two more strategies that could help:

  • Spot Instances: Using EC2 Spot Instances, which offer unused EC2 capacity at a reduced price, can significantly cut costs for workloads with flexible timing.
  • Auto Scaling: EC2 Auto Scaling helps to maintain application availability and allows to scale EC2 capacity up or down automatically according to conditions defined for the workload.

6. Amazon S3 — Simple Storage Service

Amazon S3 is an object storage service offering scalability, data availability, security, and performance. It’s ideal for startups because of:

  • Scalability: Startups can store and retrieve any amount of data at any time, making it a scalable choice for varying workloads.
  • Cost-Effective Storage Classes: S3 offers different storage classes for various use cases, like S3 Standard for frequently accessed data and S3 Glacier for long-term archival at lower costs.
  • Data Management Features: Features like lifecycle policies and intelligent tiering can help manage data effectively, moving less accessed data to cheaper storage options automatically.

7. AWS Lambda — Serverless Computing

AWS Lambda lets startups run code without provisioning or managing servers, paying only for the compute time consumed. It’s a powerful tool for startups due to:

  • Event-Driven Architecture: Lambda functions can be triggered by various AWS services (like S3, DynamoDB, or Kinesis), making it a flexible option for a wide range of applications.
  • Cost Savings: With Lambda, startups pay only for the compute time they consume, with no charges when code is not running, leading to significant cost savings for applications with varying usage patterns. But, use AWS lambda only when you serverless functions are called only 20-30% times a day.

8. Amazon RDS — Relational Database Service

Amazon RDS makes it easier to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity, automating many time-consuming tasks. Key advantages include:

  • Managed Service: RDS manages time-consuming tasks like hardware provisioning, database setup, patching, and backups.
  • Scalability: It offers easy scalability, allowing startups to adjust their database’s size and resources to meet their application’s demands.
  • Variety of Database Engines: RDS supports several popular database engines, including PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server, giving startups flexibility in their database choices.

9. Amazon ECS and EKS — Container Management

For startups using containerized applications, AWS offers Amazon ECS (Elastic Container Service) and EKS (Elastic Kubernetes Service):

  • Amazon ECS is a highly scalable, high-performance container management service that supports Docker containers and allows startups to run applications on a managed cluster of Amazon EC2 instances.
  • Amazon EKS is a managed Kubernetes service, making it easier to use Kubernetes on AWS without installing and operating a Kubernetes control plane or nodes.

By carefully selecting and effectively leveraging these AWS services, startups can build robust, scalable, and cost-effective applications and infrastructure. Each service offers unique features and pricing models that can be tailored to meet the specific needs and budget constraints of startups. Understanding and utilizing these services strategically can empower startups to focus on innovation and growth, while efficiently managing their cloud-based resources.

By adopting best practices like regular monitoring, automation, and scalable architecture, startups can effectively leverage AWS to support their growth. I've seen startups optimizing costs and bringing down upto 60% of their costs and even I've seen startups paying 150% for the same services.

A bonus you can gift your startup - AWS run a program for the startups named AWS Activate, which can give you 2 years of free runway for your cloud if used properly. Just apply here - https://aws.amazon.com/startups/credits


I've been helping startups scale their cloud strategy while making sure security and costs are on the right track for past 11 years. And i hope this guide is useful to you, and open up your Cost Explorer and see where you stand.

If you enjoyed this article, do share with your dear founders. Let's make tech easier together.