AWS Pricing and Billing (Part 1)
Tags: aws, billing, ec2, pricing
Published: 2020-01-09 18:32:45

*Last updated: 2020-02-22*

*I’ll be updating my AWS articles from time to time, as I learn more. I got my first cert — the AWS Certified Cloud Practitioner certification — on January 22nd, but as I took the practice exams (5 exams, 2x each) and the actual exam, I learned about gaps in my knowledge. So I’ll be filling those in through the articles I wrote beforehand.*

One of the critical categories of questions for the AWS Certified Cloud Practitioner exam is billing. It’s estimated to be from 12% to 20% of the exam.

Every service and support plan have their own pricing models, and I’ll try to clarify all of these here. This is a large topic, so I’m going to split this over three articles.

I don't believe the exams will ask about specific prices, as these can always change. But the important thing is understanding the relative pricing, so you could be able to make intelligent cost analysis decisions.

####Support Plans####
There are four basic plans offered by AWS, which is similarly tiered as other services you may be familiar with:

- **Basic** – This is the free tier. We get no direct tech support from Amazon. They’ll only provide us with accounting support and access to forums. 7 Trusted Advisor (future topic) checks are included.

- **Developer** – $29 and up (sliding scale) per month. We get everything included in Basic, plus a primary tech contact with 12-24 hour response time via email only. They’ll respond within 12 hours if the system is impaired or down. But they’ll provide no 3rd-party support. We’re on our own for that.

- **Business** – $100 and up (sliding scale) per month. We get everything included in Developer, but with 24×7 support, 1 hour or less response time for urgent cases (system down), within 4 hours for impaired system issues. They will help with 3rd-party issues. Communication is available via email, chat, and phone. We also have full access to Trusted Advisor checks, and access to the AWS Support API, which seems really cool, but I’ve never used it.

- **Enterprise** – $15k and up (sliding scale) per month. We get everything in Business, plus a dedicated Technical Account Manager (TAM), a personal Support Concierge, access to Event Management, seasonal promotions, events, and migrations, and 15 minute priority response time for critical issues. It seems like a huge jump in price between Business and Enterprise, but I guess they take into account that an enterprise can afford to pay a lot more for really top-notch support.

####AWS Partner Network (APN) Support Options####

Although there’s no direct AWS billing around the following two services, for the certification it’s important to be aware of what’s available. Also, as we earn our AWS certifications we’ll be directly helping our company if one of their goals is to be included in the third-party [AWS Partner Network](https://aws.amazon.com/partners/). There are several requirements for each tier, and our companies will gain plenty of benefits as its members become certified.

[**APN Consulting Partners**](https://aws.amazon.com/partners/consulting/): These are professional service firms like System Integrators and VARs that can supplement our internal team’s knowledge and help us take advantage of AWS.

[**APN Technology Partners**](https://aws.amazon.com/partners/technology/): These partners provide pre-canned SaaS or PaaS solutions and dev and security tools we can install on the AWS platform, AWS services we can integrate with, or hardware and network vendors. These are created by ISVs and often made available on the huge [AWS Marketplace](https://aws.amazon.com/marketplace/). We never need to start from scratch to get our company up and running quickly on AWS.

####Billing Preferences and Alerts####
We should put cost controls in place before the environment grows. I recommend turning on all these [billing preference settings](https://console.aws.amazon.com/billing/home?#/preferences) so there are no surprises:

- Receive PDF Invoice by Email
- Receive Free Tier Usage Alerts
- Receive Billing Alerts

I also recommend setting alarms for when certain thresholds have been reached. Alarms are set via [CloudWatch](https://aws.amazon.com/cloudwatch/). Select the Billing metrics. You can choose from several individual metrics/services, but to start out, I recommend setting one on the Total Estimated Charge. The options are pretty self-explanatory. To be alerted, you’ll also need to select an SNS (Simple Notification Service) topic (future article), and email list to alert. Please note that the only email lists allowed are those in the account.

Keep in mind that we can only track the estimated charges in CloudWatch; not our actual resource utilization. Also, we can only set coverage targets for our reserved EC2 instances in Budgets or the Cost Explorer, but not in CloudWatch.

####Billing Tools####
We can enable [Cost Explorer](https://aws.amazon.com/aws-cost-management/aws-cost-explorer/) to visualize and manage our costs and usage over time. When we enable this, we automatically get recommendations to help us reduce our costs. We have to explicitly enable this before it starts tracking our usage.

We can use the [Cost and Usage Reports](https://aws.amazon.com/aws-cost-management/aws-cost-and-usage-reporting/) for detailed, granular hourly and daily usage reports that can be exported to a spreadsheet. We also have to explicitly enable this before it starts tracking our usage. These reports give us additional service, pricing, and reserved instance metadata to better help us analyze our usage and make changes in how we allocate our resources. These reports also make great use of tags that we assign to our resources, for better categorization.

As an FYI, billing metrics only run in region us-east-1 (N. Virginia).

####General Service Pricing Info####
A major benefit of using cloud services are that instead of CapEx (capital expenditures), where we need to pay up-front fixed, sunk costs, cloud computing costs are OpEx (operational expenditures), where we pay for what we use, like electricity, water, or gas. We can reduce overall costs by 70% or more.

Pricing is based on:

- Paying as you go
- Paying for what’s used
- Paying less as more is used
- Paying even less when reserving capacity
- Paying even less as AWS grows
- Custom pricing

In general, services are charged by compute, storage, and outbound data transfer. They are priced transparently and independently. This enables our businesses to be fully elastic and allows us to focus on innovation. We don’t have to pay for services that aren’t running.

A key point to remember during the exams: billing is charged for data transfer *between* regions.

####[EC2 Pricing Models](https://aws.amazon.com/ec2/pricing/)####
There are very flexible pricing models for EC2:

- [On-Demand Instances](https://aws.amazon.com/ec2/pricing/on-demand/)
 - This is the default launch type.
 - It’s low-cost and flexible.
 - We’re charged by the hour or minute, depending upon the instance type (compute power, memory size, etc.).
 - It’s best for short-term, unpredictable workloads, and for first-time apps when starting out. Always monitor usage to see if you could benefit from other plans in the long run.

- [Reserved Instances](https://aws.amazon.com/ec2/pricing/reserved-instances/)
 - These are best for long-term savings.
 - It’s good for steady-state, predictable usage or reserved capacity.
 - We have to make a commitment over a period of time, though; 1 or 3 years.
 - These could be shared between multiple AWS accounts for the same organization.
 - Unused instances can be sold in the [Reserved Instance Marketplace](https://aws.amazon.com/ec2/purchasing-options/reserved-instances/marketplace/), so it’s not a huge concern if the need disappears before the commitment period ends.
 - It’s priced based on term, instance class, and payment class option.  These are the payment classes. Please note that all the percentages are approximate and subject to change. I’m just providing them to give you a general idea:
        - Standard – up to a 75% savings. We can’t change the attributes, though.
        - Convertible – up to a 54% savings. We can upgrade attributes (but not downgrade; this is why it’s best to start small and work your way up).
        - Scheduled – we can reserved instances for specific periods of time. Savings vary depending on the selected periods.
Terms are 1 or 3 year contracts. Of course, 3 years gives us more savings.
 - Payment term options:
        - All upfront (~40% discount over On-Demand)
        - Partial upfront (~39% discount over On-Demand)
        - No upfront (~36% discount over On-Demand)

- [Dedicated Hosts](https://aws.amazon.com/ec2/dedicated-hosts/)
 - This is the most expensive option.
 - These are physical servers dedicated for a customer’s use.
 - They give us visibility and control over how instances are placed.
 - This is useful when regulatory requirements need to be met.
 - They are single-tenant (physical isolation) as opposed to the multi-tenant instances used in other options.
 - We would also use our own third-party software licenses that are bound to physical cores or sockets.
 - These are offered in both On-Demand and Reserved (up to 70% savings).

- [Dedicated Instances](https://aws.amazon.com/ec2/pricing/dedicated-instances/)
 - Hardware is dedicated to a single customer.
 - These instances are physically isolated at the host hardware level from other AWS accounts.
 - The instances may share hardware with other instances from the same AWS account that aren’t necessarily dedicated instances.
 - These are also offered in both On-Demand and Reserved, as well as Spot Instances (up to 90% savings).

- [Spot Instances](https://aws.amazon.com/ec2/spot/)
 - This will bring the biggest savings — up to 90%.
 - This allows us to take advantage of unused EC2 capacity sitting out there in the AWS cloud. 
 - [We bid on Spot instances](https://medium.com/@mrpowers/playing-the-aws-ec2-spot-market-74b703454f4f).
 - These are only useful if our apps have flexible start and end times.
 - These are good for non-critical background tasks, like AWS Batch use.
 - These instances can be terminated at any time, so the applications running on them must be able to handle interruptions and intelligent restarts.
 - If AWS terminates a spot instance (for example, when the current price exceeds our bid price), we aren’t charged for partial hour usage. But if we terminate, we are charged for partial hour usage.
 - We decide the type of task needed upfront:
        - Load balancing workloads
        - Flexible workloads
        - Big data workloads
        - Defined duration workloads (1 to 6 hours)

- [Free Tier to start out](https://aws.amazon.com/free/)
 - We get free EC2 Micro instances for a year.

Please bear in mind that we’re also charged on the number of instances, the type of load balancing we use, auto scaling, detailed monitoring, and the use of elastic IP addresses. We’re also charged for resources used by EC2 instances, such as Elastic Block Storage (EBS), EBS snapshots, AMIs, and the actual drives on the instances themselves. We’ll be talking about these more in detail in the next billing articles, and we’ll discuss more about what these services are in later articles.

Just one more point about EC2 and [Elastic IP](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) addresses: Elastic IPs are only charged when created but *unused*. They are *not* charged when assigned to EC2 instances. It's relatively cheap, but we do want to make sure we get rid of them if we don't need to use them.