AWS Cost Optimization
AWS Cost Optimization
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.
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.
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
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
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.
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
2. AWS Cost Calculator Estimate the cost for your architecture solution
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
12. Use AWS Budgets actions to restrict the IAM policy of the individual account to
prevent new resource deployment.
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.
4. Automatically scale your DynamoDB table with the Auto Scaling feature