Amazon web service is a platform that offers flexible, reliable, scalable, easy-to-use and cost-effective cloud computing solutions. AWS is a comprehensive, easy to use computing platform offered Amazon. The platform is developed with a combination of infrastructure as a service (IaaS), platform as a service (PaaS) and packaged software as a service (SaaS) offerings.
Cost optimization is a business-focused, continuous discipline to drive spending and cost reduction, while maximizing business value. It includes: Obtaining the best pricing and terms for all business purchases. Cost optimization is more important in aws, if we did'nt control it, cost will be uncontrollablly increase.
- Rightsizing EC2 Instances
An EC2 instance is a virtual server in Aws cloud. There are some EC2 instance families in aws, we want to select apropriate family type depending on our usage. For example, if you initially selected a Memory Optimized Instance, but you see your application is not as memory-intensive as expected, switch to a General Purpose instance. The purpose of rightsizing is to match instance sizes to their workloads.
2. Release unattached Elastic IP addresses
An Elastic IP address is a static IPv4 address associated with your AWS account in a specific Region. By default, all AWS accounts are limited to five (5) Elastic IP addresses per Region. However, they are free of charge when attached to running service. Amazon will charge you $0.01/hr for each EIP that you reserve and do not use. You will be charged if you ever remap an EIP more than 100 times in a month. So you must be release unattached Elastic IPs.
3. Delete zombie resources
one of the biggest drains on your AWS bill is continuing to run unused resources that are billed continuously, not per usage. A few examples are EBS volumes, obsolete snapshots, and unused Elastic IP addresses. Use AWS Trusted Advisor to get a list of most of these zombie resources and quickly knock them out.
4. Scheduling on/off times
It’s worth scheduling on/off times for non-production instances such as those used for developing, staging, testing. We can reduce EC2 cost by shedule to off it when we don't really need.
5. Use Reserved instances and spot instances
Purchasing Reserved Instances is an easy way to reduce AWS costs .The two major avenues for discounts on AWS are committing in advance to a reserved instance for 1-3 years, or using spot instances that may shut down unexpectedly, but save up to 60% off costs. The trick is to carefully select workloads for which Reserved or Spot instances actually make sense, and avoiding using these options when they are not economical or practical.
6. Move infrequently-accessed data to lower cost tiers
Amazon S3 offers several tiers for infrequently-accessed data—S3 Infrequent Access, S3 Glacier and S3 Deep Archive Glacier. Put automation in place to identify data when it is no longer needed for active production use, and move it to the cheapest cold storage tier. Cold storage can reduce storage costs per GB from $0.023 to as low as $0.00099.
7 . Purchase reserved nodes for Redshift and ElastiCache Services
Reserved Nodes can be purchased for Redshift, ElasticCache, Redis, and Memcached Services for 1-year or 3-year terms, with the option of paying the full amount upfront or partially upfront, or paying monthly. One important note is that in order to take advantage of reservations on the ElastiCache Service, you must first upgrade Nodes to the latest generation
8. Effectively use AWS Cost Management Tools
mazon provides a broad set of free tools for cost management and optimization. Familiarize yourself with these tools, and use them to gain data, make decisions, and create rules and automated actions that will help you save money on AWS. Use Billing and Cost Management Console, AWS Cost Explorer, AWS Budgets, AWS Trusted Advisor, Amazon CloudWatch.