AWS is value-based pricing that reduces the barrier to enter the cloud. We will introduce the framework for optimizing and managing AWS spend by focusing on paying what you need.
Use Cost Optimization practice in a small environment and as you grow. Establishing these practices in your environment will help you to develop the right process and behavior.
More AWS usage drives more significant infrastructure growth in the innovation, which gives AWS a substantial economy of scale. Thereby lowering the Infrastructure cost and allowing AWS cost saving will continue the renovation to customers.
Right-Sizing: Amazon EC2 instances
Right-sizing is the process of matching the instances types and size of your demand and workloads and making sure you have the correct performance and capacity requirements at the lowest cost.
AWS says Right-sizing is the most effective way to control the cloud cost.
Select the cheapest instance available. Ensure you meet performance requirements, Select the right instance family (virtualization type, network, platform) Newer instance family generation typically have better price/performance profiles if your application supports it-beware of dependencies, legacy applications.
Analyze using CloudWatch metrics
Amazon S3 storage offers a range of storage classes:
Key points:
Do performance testing of your Lambda function. Lambda allocates the CPU power in proportion to the amount of memory configured. Memory usage is determined per-invoke can be viewed in AWS CloudWatch logs.
Identify if your function is CPU-bound or Memory-bound. Various benchmarking tools available on GitHub to identify it.
Minimize your deployment package size and complexity.
Right-Sizing Tips:
Tools for Right sizing and finding unused resources
Reserved capacity pricing:
Reserved capacity pricing is a great way to reduce your AWS DynamoDB costs by reserving your read and write capacity units in advance, and you can obtain significant cost saving compared to the On-Demand pricing model
Amazon DynamoDB pricing:
Dynamo DB free tier:
DynamoDB feature included in the AWS free tier calculated each month on pre-region, per-payer account basis:
Increase Elasticity to Always Meet Business Demands. In AWS Cloud, you can optimize costs to meet your needs and turn off the resources when they are not in use. You can turn off non-production instances for 70% or more of any given week. Also, you can scale the service for short term usage and helping you to reduce your billing. Since spot instances are available on discount as compared to on-demand pricing, you can reduce 90% of the operating cost of your running application compared to on-demand instances.
Tools for Increase Elasticity
AWS provides the following purchasing option to optimize your cost based on your actual needs:
Purchasing Options
On-demand pay per unit only for what you used
Example: Amazon S3, Amazon EC2
Provisioned as pay per unit of capacity
Examples: Amazon Kinesis Data Streams, Amazon DynamoDB
Reserved discounted pricing in return for a fixed-time commitment.
Examples: AmazonEC2, Amazon Elasticsearch Service
Many services support multiple billing options, auto-scaling.
Reserved Instance Pricing
In AWS, each instance’s type offers different compute, memory, and storage capabilities. Each instance type is grouped into instance families based on the capabilities. When we right-size our Instances, select on Instance type based on requirements, and the demand of the application that you need to run AWS ensures that each instance type provided will have a consistent amount of CPU capacity.
Dedicated Host can help you address compliance requirements and reduce costs by allowing you to use your existing server-bound software license.
Purchasing and Billing: When you use a dedicated Host to your account, On-Demand billing is automatically activated. You must have a dedicated host in your account purchasing reservation.
Dedicated Instance
In comparison to On-demand Instance, pay for dedicated Instances save 70% by purchasing Reserve Instance or save 90% by purchasing Spot Instances.
Spot Instances
Spot Instances are the EC2 capacity that can save up to 90% of On-Demand prices that AWS can interrupt with in a notification. It uses the same underlying EC2 instances as On-Demand and Reserved Instances and is best suited for the flexible workload.
Capacity Reservation purchasing option
If you require a capacity reservation, it is AWS best practice to purchase Reserved Instances or capacity reservation for a specific Availability zone or purchase schedule Instances. Spot Instances are a cost-effective choice, but you must be flexible with them since your application can be interrupted, including when your application run. Dedicated Host and dedicated Instances can help you reduce your costs because they allow you to use your existing already paid server-bound software license.
Dedicated Host
Dedicated Host an help you address compliance requirements and reduce costs by allowing you to use your existing server-bound software license.
Purchasing and Billing: When you use a dedicated Host to your account, On-Demand billing is automatically activated. You must have a dedicated host in your account purchasing reservation.
Dedicated Instance
In comparison to On-demand Instance, pay for dedicated Instances save 70% by purchasing Reserve Instance or save 90% by purchasing Spot Instances.
Spot Instances
Spot Instances are the EC2 capacity that can save up to 90% of On-Demand prices that AWS can interrupt with in a notification. It uses the same underlying EC2 instances as On-Demand and Reserved Instances and is best suited for the flexible workload.
Capacity Reservation purchasing option
If you require a capacity reservation, it is AWS best practice to purchase Reserved Instances or capacity reservation for a specific Availability zone or purchase schedule Instances. Spot Instances are a cost-effective choice, but you must be flexible with them since your application can be interrupted, including when your application run. Dedicated Host and dedicated Instances can help you reduce your costs because they allow you to use your existing already paid server-bound software license.
AWS helps you reduce a comparative Total Cost of Ownership (TCO). TCO is the comparative total cost analysis, the operating cost, running in your infrastructure on the AWS environment, and running your infrastructure in the traditional on-premises environment.
AWS helps you to reduce TCO by reducing the need to invest in large capital expenditure and providing a pay-as-you-go model that empowers users to invest in the capital you need. TCO provides a detailed set of reports. TCO is a projection of the direct and indirect cost of purchasing a product or services
TCO calculators allow users to estimate the total cost savings when using AWS and provide a detailed set of reports. The TCO calculator also gives you the option to modify assumptions that best meet your business needs.
The TCO Calculator guides on possible realized savings when using AWS. This tool is built on a calculation model that generates a fair cost of value that a customer may achieve. This tool is for approximation purposes only.
Lowering TCO
The TCO Calculator automates the task of selecting the right AWS instance type based on the information you provide. You can describe your physical or virtual infrastructure in detail, and the calculator will provide the equivalent AWS instance types that meet requirements.
You can download a cost breakdown report or store in Amazon S3 and share it with others. It provides a comprehensive & detailed cost breakdown.
Viewing your monthly charges:
When you select a one-time fee to incur AWS charges the credit card and issues your invoice as pdf, you can also download the pdf from Billing and Management console using the below measure.
Note:
IAM users need explicit permission to see some of the pages in the Billing and Cost Management console.
To view your monthly charges:
To view your Billing charges for a different month:
To download a copy of your billing charges as a PDF document:
To download a monthly Billing report:
Getting an Invoice Mailed to you
Follow the below steps to have a PDF copy of your monthly invoice sent to the email address associated with your account.
To edit your email recipients, see Editing Contact Information.
Note: The PDF invoice is difficult from a tax invoice. The Tax invoice is specially for your tax charges, whereas PDF invoices show your monthly AWS charges.
When AWS bill will be ready, and an invoice/bill will be charged?
Your AWS bill/Invoice for the previous month is finalized and ready at the beginning of each month. Shortly after, the bill/Invoice is charged to your default payment method, usually between the 3rd and the 5th day of the month.
If you are using the Cost and Usage Report, check the bill/InvoiceID column there. The bill/InvoiceID column is blank until your bill is finalized.
AWS Billing and Management console provide features and a dashboard to view and manage your costs and usage.
The following are the steps to discuss the most common tasks that you’re likely to perform when using the Billing and Cost Management console.
AWS Billing and management includes Cost Explorer for a deeper dive into AWS Cost and usage. AWS Cost Explorer lets you visualize, understand, and manage your AWS costs and usage over time. If you have multiple AWS accounts within an AWS organization, cost will be consolidated in the master account.
Enable Cost Explorer
You can enable Cost Explorer for your AWS account using the Billing and Cost Management console, but you can’t enable Cost Explorer using the API. When you allow Cost Explorer, AWS prepares the report about your costs for the current month and the last three months and calculates the forecast for the next three months. The current month’s data is available for you for viewing in about 24 hours. The rest of the data will take a few days longer. Cost Explorer updates your cost data report at least once every 24 hours.
By default, you can launch Cost Explorer if your account is a member account in an organization. The Master or root account can, however, block your access.
Note:
An account’s status within an organization affects what cost and usage data is visible:
Signing up to Cost Explorer and receive the AWS Cost and Usage data Report or the Detailed Billing Data doesn’t automatically enable Cost Explorer. You must enable it by performing the below procedure.
To Enable Cost Explorer
AWS Budget creates a custom cost usage budget to track AWS cost, and usage. Use of AWS Budget to set the custom budget that alerts you when your costs or usage exceed (or a forecasted to exceed) your budgeted amount. Also, use the AWS budget to set reservation utilization or coverage target and receive alerts when your utilization drops below the defined threshold. AWS Budgets give you the ability to set up the alert if you exceed or are approaching your defined budget.
Feature: You can create up to 5 alerts each budget and each alert can notify up to 10 email recipients as well as publish to SNS.
AWS Budgets information is updated three times a day. Budgets track your unblended costs, refunds, subscriptions, and RIs. You can create the types of budgets given below:
For per master account you can create up to 20,000 budgets or AWS Organizations standalone account. The first 62 days of budget are free of charge for each month. For regular accounts, each additional budget day costs $0.02.
AWS Trusted Advisor
AWS says that AWS Trusted Advisor is an online tool that provides you real-time guidance to help you to provide your resources AWS best practices and can reduce Instance performance Improve security.
Five categories and seven cores Trusted Advisor checks
Optimized your AWS infrastructure with the five types of trusted advisor
All AWS customer gets the access of seven cores Trusted Advisor checks:
Business support and Enterprise support customers get full access to the complete set of Trusted Advisor checks and recommendations. These checks help optimize your entire AWS infrastructure, security, and performance, reduce overall cost and monitor service limits.
AWS Tagging
AWS-generated tags are tagging that AWS defines, and used to supported AWS resources for cost allocation purposes. To use an AWS generated tags, a master account owner must activate it in cost and management console for cost allocation tagging.
User-Defined tags are the tags that you define, create, and apply to resources. After you have created and applied it, you can activate them in the Billing and cost management console for cost allocation tagging.
AWS makes it easy to modify the tags to meet your changing business requirements. Remember to include future-plans for billing reports, automation, and access control in your tagging strategy
Tagging provides several benefits
Keep usage and expenditure awareness, Tag all the resources to enable the cost attribution. Ensure business owners have visibility into their workload cost. Always create reports, budgets and alerts. Optimize over time and give responsibility (and authority) for AWS cost optimization within your organization.