0% found this document useful (0 votes)
146 views

AWS Cost Optimization

The document provides recommendations for startups to reduce their AWS cloud costs. It discusses AWS Activate which offers startups free AWS credits and resources up to $100,000 to help grow their business. It also recommends optimizing AWS resources like Lambda functions and choosing the appropriate cost savings plans, regions, and storage classes to avoid overpaying for cloud services. Regularly reviewing usage and configs with tools like Cost Explorer, Trusted Advisor and tagging resources can help startups better optimize costs on AWS.

Uploaded by

Debarghya Nanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views

AWS Cost Optimization

The document provides recommendations for startups to reduce their AWS cloud costs. It discusses AWS Activate which offers startups free AWS credits and resources up to $100,000 to help grow their business. It also recommends optimizing AWS resources like Lambda functions and choosing the appropriate cost savings plans, regions, and storage classes to avoid overpaying for cloud services. Regularly reviewing usage and configs with tools like Cost Explorer, Trusted Advisor and tagging resources can help startups better optimize costs on AWS.

Uploaded by

Debarghya Nanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

How startups

can reduce their


cloud bill
AWS Active Program
AWS Activate offers start-ups free tools, resources, and more to quickly get started on
AWS.

Build and scale with up to $100,000 in AWS Activate credits

It provides start-ups with a host of benefits, including AWS credits*, AWS support plan
credits, and architecture guidance to help grow your business. Activate benefits are
designed to give you the right mix of tools, resources, and expert support so you can
succeed with AWS while optimizing performance, managing risk, and keeping costs
under control.

Activate Founders

Activate Founders provides self-funded and bootstrapped start-ups with $1,000 in AWS
credits, $350 in Developer support credits, pre-built infrastructure templates, exclusive
offers, and more. To apply, ensure you meet the application criteria below.

Activate Portfolio

Activate Portfolio provides start-ups associated with a venture capital firm, accelerator,
incubator, or other startup-enabling organization that is also an AWS Activate Provider
with up to $100,000 in AWS credits, up to $10,000 in AWS Business support credits, pre-
built infrastructure templates, training, curated content, exclusive offers, and more. To
apply, ensure you meet please review the application criteria below:

Stop guessing
Even if there is no server management or capacity planning in serve-less computing but
it’s quite difficult to decide how much memory to allocate for the lambda function.

1. Use cloud watch Lambda insights to actual memory usage and execution time.
Then based on desired performance we can tune the memory settings.

2. As CPU is allocated based on memory allocation configuring higher memory


can reduce execution time hence the cost.

3. AWS Compute Optimizer recommends optimal AWS resources for your workloads
to reduce costs and improve performance by using machine learning to analyze
historical utilization metrics
4. AWS Lambda Power Tuning is a state machine powered by AWS Step
Functions that helps you optimize your Lambda functions for cost and/or
performance in a data-driven way.

5. With Compute Savings Plans, Lambda usage for Duration, Provisioned


Concurrency, and Duration (Provisioned Concurrency) will be charged at
discounted Savings Plans rates of up to 17% for a 1 or 3 year term, up to the
commitment level

Don’t pay for what you don’t need


In a typical project setup there are 3 deployment stages are involved dev, Testing,
production.

It’s a common mistake that all the environments are turned on 24 x 7 while dev and
testing infrastructure resources are typical required in known time frame.

Use AWS Instance Scheduler provided by AWS solution library to automatically start stop
dev and QA resources like EC2 and RDS instances if you don’t need them 24 x 7.
Choose right cost saving plans
It’s a known approach to go for Reserved Instances over on demand instances to get a
noticeable discount over on demand EC2 instances.

Reserved Instances are not physical instances, but rather a billing discount. But major
problem with Reserved instance is you can’t change the instance type or region when
may you need a different instance type.

AWS Compute Savings Plans can provide savings of up to 72% on your AWS compute
usage–regardless of instance family, size, OS type, tenancy, or AWS Region.

Depending on the need you should plan and chose the right option from the available
cost saving plans provided by AWS.
Act on AWS advises
Sometimes in a typical start-up development team it’s challenging to onboard
experienced cloud expert. That often eliminate the scope for reviewing cloud
architecture and common pitfalls became unknown.

Trusted Advisor service can help you save cost with actionable recommendations by
analyzing usage, configuration and spend. Examples include

1. identifying idle RDS DB instances,


2. underutilized EBS volumes,
3. un associated Elastic IP addresses
4. Excessive timeouts in Lambda functions.
Review and Re-plan your log
archival strategies
It’s quite typical to store application logs to a S3 bucket with its default standard
storage class as S3 provides eleven 9’s of durability and it’s quite cheap.

You pay for storing objects in your S3 buckets. The rate you’re charged depends on
your objects' size, how long you stored the objects during the month.

Over time this logs can grow to a noticeable size but do we need to really access all
the old logs very frequently?

S3 provides different storage classes for long time archival with much cheaper price
such as

1. S3 Glacier Instant Retrieval - $0.004 per GB


2. S3 Galcier Flexible Retrieval - $0.0036 per GB
3. S3 Galcier deep archive - $0.00099 per GB
4. S3 Standard - $0.021 per GB

To manage your objects so that they are stored cost effectively throughout their
lifecycle, configure their Amazon S3 Lifecycle.

For example, you might choose to transition objects to the S3 Standard-IA storage class
30 days after creating them, or archive objects to the S3 Glacier Flexible Retrieval
storage class one year after creating them.
But if you are unsure about what should be the right strategy for object storage class
transition you can opt for S3 Intelligent-Tiering.

It is the first cloud storage that automatically reduces your storage costs on a granular
object level by automatically moving data to the most cost-effective access tier based
on access frequency, without performance impact, retrieval fees, or operational
overhead.

Don’t call your backend when not


needed
In a typical serverless backend setup A lambda gets executed either via API gateway
or a when mobile client is calling a GraphQL end point configured in AWS AppSync.

One of the pricing factors is number of lambda calls.

In a web app or mobile app there are lots of data that don’t change very often for
example any master data but we need to display them in the web or mobile UI.

We can enable API caching in Amazon API Gateway to cache your endpoint's
responses. With caching, you can reduce the number of calls made to your endpoint
to reduce cost and also improve the latency.

AWS AppSync's server-side data caching capabilities make data available in a high
speed, in-memory cache, improving performance and decreasing latency
In some cases where we need more controlled caching mechanism we can use AWS
ElascticCache

Watch for resource Wastage


1. Don’t forget to Release unattached Elastic IP addresses
2. Upgrade instances to the latest generation
3. Delete unattached EBS volumes, obsolete snapshots
4. Delete unused load balancers
5. Delete unallocated disk volumes
6. Delete unnecessary objects & buckets

Use right cost analysis tools


1. AWS Cost Explorer Visualize, understands, and manages your AWS costs and
usage over time

2. AWS Cost Calculator Estimate the cost for your architecture solution

3. Review expense forecast with Trusted Advisor.

4. Create budget plans for your resources

5. Tag all your resources may be based on stages like dev, testing or based on type
of service like backend, database for better traceability

6. Tools like AWS Tag Editor and AWS Config help in the execution of tagging with
compliance

7. Use AWS Cost Explorer Resource Optimization to get a report of EC2 instances
that are either idle or have low utilization

8. Use the Trusted Advisor Amazon RDS Idle DB instances check, to identify DB
instances which have not had any connection over the last 7 days

9. For Redshift, use the Trusted Advisor Underutilized Redshift clusters check, to
identify clusters which have had no connections for the last 7 days, and less than
5% cluster wide average CPU utilization for 99% of the last 7 days
10. Use the Trusted Advisor Idle Load Balancers check to get a report of load
balancers that have RequestCount of less than 100 over the past 7 days

11. Implement AWS Organizations and consolidated billing

12. Use AWS Budgets actions to restrict the IAM policy of the individual account to
prevent new resource deployment.

13. Quarantine the account to an organization unit in AWS Organizations with


restrictive SCPs. This approach enables to apply specific restrictions per account
basis.

Choose right region


Not all AWS regions have same cost structure. Both US East regions, us-east-1 (Northern
Virginia) and us-east-2 (Ohio), are priced very low compared to the others.

The European regions are generally around 10% more expensive, with Stockholm being
the cheapest of them all—only 6% more expensive than the cheapest U.S. regions. The
Asia market is about 20-25% more expensive, with Seoul being the cheapest on that
side of the world at only 10% more than US East.

Opt for the cheapest region for your Dev and Testing environment you can save a lot of
money.

Whichever region you choose, stick to that region and also always use the same
Availability Zone, as there are fees for transferring data across them. Even though
they’re part of the same region, Availability Zones are physically separated data
centers.

AWS well architected framework


The AWS Well-Architected Framework helps you understand the decisions you make
while building workloads on AWS. The Framework provides architectural best practices
for designing cost-effective workloads in the cloud. It demonstrates a way to
consistently measure your architectures against best practices and identify areas for
improvement.
Other Common Recommendations
1. Run high workload applications on Amazon EFS to take advantage of auto-
scaling

2. Employ auto-scaling to allocate storage for the workload

3. Use cloud front to reduce data transfer cost from S3 or EC2

4. Automatically scale your DynamoDB table with the Auto Scaling feature

5. where performance requirements are lower, using Amazon EBS Throughput


Optimized HDD (st1) storage typically costs half as much as the default General
Purpose SSD (gp2) storage option

6. Use Spot instances where possible to perform asynchronous operations. Spot


Instances are available at up to a 90% discount compared to On-Demand
prices. You can use Spot Instances for various stateless, fault-tolerant, or flexible
applications such as big data, containerized workloads, CI/CD

7. Process messages in batches from SQS to reduce number of lambda / backend


calls to save cost
8. Use AWS Lambda event filtering options for SQS, DynamoDB and Kinesis as event
sources. With event pattern content filtering, customers can write complex rules
so that their Lambda function is only triggered by SQS, DynamoDB, or Kinesis
under filtering criteria you specify. This helps reduce traffic to customers’ Lambda
functions and reduces overall cost.

You might also like