Have you ever been confused by which AWS tool to use for your startup? AWS currently has more than 100 services listed on its platform across 20 categories. As Amazon continues adding new services to its platform at an incredible rate, it is becoming impossible, especially for startups and engineers to know which AWS service they should be using.

aws-services

In this article I’ll breakdown the evolution of a startup into three stages and talk about which AWS tools in particular are useful in each of these stages. This article should give you a good mental model for choosing between various AWS tools. The different stages we are going to talking about are:

Note: The different stages have been oversimplified for this article. Services mentioned at each stage build upon the services mentioned in the earlier stages.

Early Days / Founding Stage

During this stage, the focus is on building a prototype as quickly as possible. Startups at this stage should be releasing, listening to their users and iterating as quickly as possible. What this means is that startups should focus on building applications and not infrastructure.

Serverless technologies are a good fit for this use-case. Some compelling reasons to use serverless technologies are:

  • Reduces operational overhead as there is no (or minimal) server maintenance
  • Frees up engineering resources to focus on the product
  • Probably cheaper at this stage since you only pay for resources used and not for idle time
  • Scales automatically so you don’t have to worry about any potential reliability issues if your product goes viral

Startups should consider using a subset of the following services:

Compute

AWS Lambda

AWS Lambda is a serverless technology which lets you run any function without provisioning or managing any servers. These functions can be written in a bunch of different languages such as Python, Go, Java, JavaScript. Amazon only charges you for the time it takes for the functions to run. Amazon also handles any potential scaling requirements for the application.

Some good resources on Lambda:

AWS Fargate

AWS Fargate is also a serverless technology which lets you run any containerized application without having to provision or manage any servers.

To learn more about Fargate, check out this deep dive on Fargate.

AWS EC2

Due to the rise of serverless technologies, you might not need to use EC2 instances directly during the early stages of your startup. However, EC2 is a foundational service on which almost every other AWS service is based and knowing how it works will help in understanding how your application is running.

Amazon Elastic Cloud Compute (EC2) lets you spin up server instances instantly. Each EC2 instance is a virtual machine which includes both storage and compute resources.

To learn more about EC2, check out this introduction to EC2.

Database

Amazon offers Database as a Service (DBaaS) which are easy to setup, operate and scale.

Some of the main benefits of these services are:

  • No / minimal infrastructure management
  • Highly available
  • Backup &restore capability

Amazon RDS

Amazon Relational Database Service or RDS is a managed database service from Amazon. Amazon provides multiple database choices such as MySQL, PostgreSQL, Oracle etc.

Amazon Aurora

Amazon Aurora is a proprietary relational database. It is compatible with MySQL and PostgreSQL.

To learn more about the differences between Aurora and RDS, take a look at this article from Percona.

Storage

AWS S3

Amazon Simple Storage Service or Amazon S3 is an object storage service. In S3, you only pay for the resources you use. S3 can be used to store and retrieve any amount of data, at any time, from anywhere on the web.

S3 has a lot of different use-cases. It can be used to store anything - images, videos, application binaries. It is fast, cheap and highly available.

Some good resources on S3:

Developer Tools

CloudFormation

AWS CloudFormation is an Infrastructure as Code service. It lets you describe and provision all of the AWS resources for your application via code. This code serves as the source of truth for your cloud environment.

The benefits of using such a service are:

  • Speed & Simplicity: New resources can be created by modifying a file and running a shell command. Similarly, you can make any changes to existing resources by editing the code.
  • Consistency: Since the entire Infrastructure is defined in code, you no longer have to worry about snowflakes. You can replicate your infrastructure quickly and consistently.

CloudWatch

AWS CloudWatch is a monitoring and observability service. It is intended for monitoring resources and applications running on AWS. Some of the things you can do using CloudWatch are collect and track metrics, collect and monitor log files and many more.

Some of the benefits of using CloudWatch:

  • Ensure that your service is always running and customers can access it.
  • Monitor any errors or performance issues that customers might be seeing.

Some good resources on monitoring:

Networking

Route53

Route 53 is Amazon’s DNS service. The main functionalities that Route 53 provides are:

  • Domain registration
  • DNS routing
  • Health Checks

Route 53 is cheap, reliable and integrates well with other AWS services.

How to use these services for your startup

The services listed above can be combined to build a prototype pretty quickly. Some examples of different applications that have been built using these services are:

This AMA session also has a lot of good insights: How to Build Your MVP w/ AWS & Segment AMA

Architecting for 10,000 users is kind of beyond an MVP, and you may risk premature optimization. I think customer development may be more important for you at this stage than building for scale; you need to make sure your early customers are very psyched, and become cheerleaders. To do that, I first build using the stack I can crank out things the fastest in (Rails apps on Fargate backed by Aurora in my case, fwiw), and then optimize as necessary if it gets traction.

Product / Market Fit

As a startup finds product and market fit, your product will evolve and start getting more mature. Startups will have a better idea of what customers want and what they don’t. Some of the requirements from the product at this stage could be:

  • Better application performance and reliability: As your startup gets more users, performance becomes more important. Your users care a lot about the performance and reliability of the service.

  • Developer Tooling: Startups at this stage might be hiring more employees and this increases the need for more developer tooling to ensure that startups can maintain their development velocity.

  • Multiple workloads: In addition to the product used by your customers, there might be additional workloads which might be required such as Batch jobs to do offline computations.

Compute

AWS ECS

Amazon Elastic Container Service (ECS) is a container orchestration service that supports Docker containers and lets you run containers easily on AWS. Some reasons for exploring ECS as a startup gets more mature would be:

  • Using Docker to package all your application dependencies.
  • Might be more cost-effective than Serverless (depends on the use-case / scale).
  • You need more flexibility over resources (e.g. you need more memory than Lambda can offer)

This article provides a good introduction to ECS.

AWS AutoScaling

AWS AutoScaling can help monitor your application and make sure you always have enough capacity to serve traffic. You can use AutoScaling to create scaling policies for various AWS services such as EC2 instances, ECS tasks, Aurora Replicas etc.

Database

AWS ElastiCache

ElastiCache is Amazon’s fully managed in-memory caching service. You have the choice of deploying either Redis or Memcached. Some of the benefits of using ElastiCache:

  • Minimal / no operational overhead
  • Automatic detection and recovery from cache node failures.
  • Automatic failover (Multi-AZ) of a failed primary cluster to a read replica in Redis replication groups.

This article provides a good introduction to Elasticache.

Networking

Elastic Load Balancing

Amazon Elastic Load Balancing (ELB) automatically distributes incoming traffic across multiple targets such as Amazon EC2 instances, containers, Lambda functions, etc.

Some of the benefits of using an ELB:

  • Can handle varying loads of traffic
  • Highly available
  • Support application health checks

ELB’s help companies handle a spike in traffic and avoid unavailability due to an overload of requests from users. ELBs work well with AWS AutoScaling and help make your application more available.

Some good resources to learn more about ELBs:

CloudFront

Amazon CloudFront is a content delivery network (CDN) service that helps deliver your content to the end-user with low latency. CloudFront has servers across the globe and thus it can serve your end-users using the servers closest to them which helps improve the latency of your application.

Some of the benefits of using CloudFront are:

  • Low latency, better performance if your application uses a lot of static resources (images, videos, static content etc)
  • Can help protect your application from DDoS attacks

Developer Tools

CodePipeline

AWS CodePipeline is a fully managed continuous delivery service that can help automate the release and delivery process for your application. Using CodePipeline, you can model, visualize and automate the steps required to release your application.

Some of the benefits of using CodePipeline are:

  • Automate your release process: Since CodePipeline lets you define your release process, the entire process can be automated and you can potentially eliminate any manual involvement in the process.
  • Consistent release process: Since your pipeline is defined, your application will always be released in the same way eliminating any snowflakes in your release process.
  • Monitoring / logging: You have access to logs from the various stages in your pipeline and you can setup alerting if anything in your pipeline fails.

Good resources to learn more about CodePipeline:

Security

IAM

Amazon Identity and Access Management (IAM) is a service which lets you control access to various AWS resources. IAM can be used to control who has access to the AWS console and to which services they have access to.

These following articles cover some of the best practices for IAM:

Late Stage / Achieving Scale

As a startup starts achieving scale, there are a lot of different requirements for tools. In addition to the core product, you also need to provide resources for non-engineering focused employees. Some of these requirements would be:

  • Much higher data volume so need for data processing and querying tools
  • Tools to support analytics to better understand customers
  • More emphasis on reliability

Database

DynamoDB

Amazon DynamoDB is a fully managed NoSQL database service. Similar to RDS, Amazon manages the operations for the database such as replication, backups, load balancing etc.

If your application has data which is more suited to a NoSQL service, then DynamoDB is a good fit.

Some of the benefits of DynamoDB are:

  • Scalability & performance
  • Cross-region replication
  • Fine-grained control over who can access which tables

To learn more about how DynamoDB works, this article is a good resource.

Analytics

Redshift

Amazon Redshift is a hosted data warehousing service. Redshift is built specifically to handle analytics workloads on large datasets.

Some of the advantages of using Redshift are:

  • It is a fully managed service
  • Provides a SQL like query schema
  • Much more performant for analytics use cases compared to a traditional Relational database.

This article provides a good introduction to redshift.

AWS Athena

Amazon Athena is a serverless query service that makes the analysis of data, using standard SQL, stored in Amazon S3 simpler. With few clicks in the AWS Management Console, customers can point Amazon Athena at their data stored in Amazon S3 and run queries using standard SQL to get results in seconds.

With Amazon Athena, there is no infrastructure to set up or manage, and the customer pays only for the queries they run.

A few reasons why Athena is a compelling product:

  • Easier to get started with as compared to Redshift.
  • Cost-effective as you only pay for the queries you run.

Introduction to Amazon Athena is a good starting point to learn more about Athena.

How to use these services

There are a lot of good resources available online on how to use some of these services to built systems. Some examples are:

Final Thoughts

AWS has a lot of different tools available and this can sometimes be overwhelming for startups and engineers. This is how I think about navigating the different AWS tools available and what to use:

  • Use the tools which do the job. Execution is important for a startup. Don’t limit yourself to AWS tools if there are other tools and services that are better.
  • Use as few services as possible to keep the architecture as simple as possible so even if you need to change your system architecture in the future, it will be easier.
  • Only add new tools when the need arises. Overengineered systems can add a lot of technical debt.

A Beginner’s guide to scaling on AWS is a great read to learn more about scaling on AWS as well.

Thanks a lot for reading! I am interested in learning what kind of tools have been helpful as you all work on startups at different stages and what some of the learnings have been.

I am also planning to create a PDF cheatsheet which shows how the AWS tools apply to different stages of a startup. If that is something of interest to you, please sign up on the mailing list below!