DEV Community

Cup of Code
Cup of Code

Posted on • Originally published at cupofcode.blog

Introduction to AWS — Billing & Pricing

All you need to know about pricing for AWS services and AWS services for billing

Welcome to the 6th blog post in the AWS series! This time we will talk about money, and it’s an important topic in the Cloud Practitioner exam! So what will we talk about today? Here is a table of content for easy access:

  1. AWS Pricing Introduction

  2. 4 Key Principles

  3. The AWS Free Tier

  4. The Different Support Levels

  5. Pricing for individual services

  6. AWS services that are related to billing

  7. Resource Groups & Tagging

Shall we begin?


AWS Pricing Introduction

Every AWS topic has a whitepaper, and the link to the pricing whitepaper can be found here.

Before we dive into the pricings in AWS, let’s recap two fundamental terms we got introduced to in the first blog post:

Different Pricing Models: CAPEX vs OPEX

CAPEX stands for Capital Expenditure, which is where you pay upfront. It’s a fixed, sunk cost because you need to accurately predict how much resources you are going to need, and it doesn’t give you flexibility for peaks and lows.

OPEX stands for Operational Expenditure which is where you pay for what you use, like electricity bill. Some of you would think it’s also like a water bill but here in Ireland, there is no such thing ;)

For example — Do you need 100 servers for daily traffic and another 50 for the holiday season? With CAPEX, your only way to support that need is to rent 150 servers for the whole year. OPEX, on the other hand, gives you flexibility.

Now that we established that Operational Expenditure is way better for us, let’s dive into what AWS has to offer.

The Pricing Philosophy of AWS

Here is a quote from the whitepaper:

“While the number and types of services offered by AWS have increased dramatically, our philosophy on pricing has not changed. You pay as you go, pay for what you use, pay less as you use more, and pay even less when you reserve capacity.

Let’s talk about them a bit:

  • Pay as you go —in contradiction to paying in advance.

  • Pay for what you use — and not a pre-defined fixed price.

  • Pay less as you use more — (per unit), like when a pack of 6 bottles of 1.5L coke is cheaper per bottle than purchasing a single 1.5L

  • Pay less when you reserve capacity — Like with EC2 instances, for example.

Speaking of EC2 instances, here is a quick recap of the EC2 Pricing Models:

  1. On-demand: This allows you to pay a fixed rate by the hour (or by the second) with no commitment.

  2. Reserved: Provides you with a capacity reservation, and offers a significant discount on the hourly charge for an instance (like booking a hotel room a year in advance). Contract terms are 1 year or 3 years terms.

  3. Spot: Enables you to bid whatever price you want for instance capacity, providing for even greater savings if your applications have flexible start and end times.

  4. Dedicated hosts: A physical EC2 server dedicated for your use. Dedicated hosts can help you reduce costs by allowing you to use your existing server-bound software licenses.

[Introduction to AWS: EC2, related services, and AWS through the CLI](https://medium.com/geekculture/introduction-to-aws-ec2-related-services-and-cli-cfbae53c3409)

This will be useful when you’ll get asked “Which of the following is an EC2 pricing option?”


Key Principles

While pricing models vary across services, it’s worthwhile to review the 4 key principles and best practices that are broadly applicable.

1. Understand the fundamentals of pricing: There are three fundamental drivers of cost with AWS: Compute, Storage, and Data outbound (data going out). Remember that when you get asked “Which of the following is not a fundamental AWS charge?” *— The answer is *Data Inbound**.

2. Start early with cost optimization: Whether you started in the cloud, or you are just starting your migration journey to the cloud, AWS has a set of solutions to help you manage and optimize your spending.

3. Maximize the power of flexibility: One of the key advantages of cloud-based resources is that you don’t pay for them when they’re not running. By turning off instances you don’t use. you can reduce costs by 70% or more compared to using them 24/7. You can choose and pay for exactly what you need — no minimum commitments or long-term contracts are required unless you choose to save money through a reservation model.

4. Use the right pricing model for the job: AWS offers several pricing models depending on the product. These include:

  • On-demand instances: you pay for compute or database capacity by the hour or second
  • Saving Plans: a flexible pricing model that offers low prices in exchange for a commitment to a consistent amount of usage
  • Spot Instances: in EC2, which we learned about in a previous blog post.
  • Reservations: which grants you up to 75% discount.

The AWS Free Tier

The AWS Free Tier enables you to gain free, hands-on experience with more than 60 products on the AWS platform. Why give services free? To attract new customers, of course! And more officially: To help new AWS customers get started in the cloud.

AWS Free Tier includes the following free offer types:

  • 12 Months Free —12 months following your initial sign-up date to AWS. When your 12-month free usage term expires, or if your application use exceeds the tier, you simply pay standard, pay-as-you-go service rates.
    → Under this category, you can find (to some extend*) EC2, S3, RDS, and CloudFront.

  • Always Free — These free tier offers do not expire and are available to all AWS customers.
    → Under this category, you can find (to some extend*) DynamoDB, S3 Glacier, and Lambda.

  • Trials — This tier’s offers are short-term free trials starting from the date you activate a particular service. Once the trial period expires, you simply pay standard, pay-as-you-go service rates.
    → Under this category, you can find (to some extend*) Redshift and GuardDuty.

This section lists some of the most commonly used AWS Free Tier services. The full list of AWS Free Tier services can be found here.

When I write *(to some extend)*** it means for the first X hours / Y GB or Z requests.

Remember when we talked about account types in the first blog post, under Available Regions? So, the AWS Free Tier is not available in the AWS GovCloud (US) Regions or the China (Beijing) Region at this time. The Lambda Free Tier is available in the AWS GovCloud (US) Region.

Speaking of free, remember those for when you’ll get asked “Which of the following AWS services are free? Choose 3”

  • Please keep in mind that with VPC, Elastic Beanstalk, CloudFormation, and Auto-Scaling, the underlying provisioned resources will incur charges.

The Different Support Levels

How many support levels are there? Depends on who you ask.

  • In the course I took, they mention four support levels: Basic, Developer, Business, and Enterprise.

  • According to the pricing whitepaper, there are 3 support levels: Developer, Business, and Enterprise.

  • In that whitepaper, they send you to a page called AWS Support Plan Pricing, where they introduce four support levels: Developer, Business, Enterprise On-Ramp, and Enterprise.

[AWS Support Plan Pricing](https://aws.amazon.com/premiumsupport/pricing/)

I understand why “Basic” isn’t technically a support plan (and not counting it fits well with my Pokèmon reference), and Also — there is a good chance Enterprise On-Ramp is too recent to be asked about in the exam — so I’m not going to talk about this one, but you should remember those names, because you can be asked “Which of the following is an AWS plan?” *and they give made-up options like *“Individual”.

What Is The Difference?

You will soon see a beautiful table with the contrast between the available support levels, but to summarize:

  • Basic — Free, but that’s the only good thing about it.

  • Developer — Start with $29, and has support that an individual developer needs: Case opening with support, support only on business hours — nothing urgent.

  • Business — Start with $100, and they need more availability — tech support 24x7 through chat and phone as well as email, and the ability for anyone in the account to open cases.

  • Enterprise — Start with $15,000, very expensive, compared to the Business level, which looks similar but has 2 main differences: 15 minutes response (that’s fast, you gotta admit) for business-critical systems down, and a 1:1 with a designated Technical Account Manager (TAM) to proactively monitor your environment and assist with optimization and coordinate access to programs and AWS experts. Fancy.

Important Notes:

  • All the costs are monthly and start at the price mentioned, but scale based on the usage! Also, not mentioned in the course but is mentioned in the AWS Support Plan Pricing —* “Greater of $5,500.00 - or - 10% of monthly AWS charges”.* Could be too new to be asked about — but worth mentioning.

  • The response times under the Developer level (24b, 12b) are in business hours — so 24 hours is actually 3 days, not 1.

Questions on this topic are tricky: “Which of the following AWS Support Plans provide Enhanced Technical Support ONLY during business hours via email?”. The answer is — Developer.


Pricing Details for Individual Services

This section is tricky as well! It requires memorizing (and common sense) because questions in this section go something like this: *“Which of the following components are billed for Amazon RDS instances?”. *Don’t worry, When mentioning a service, I’ll give a reminder of what it is!

Let’s start with EC2: Elastic Compute Cloud (EC2) is a virtual server in the cloud.

*EIP = elastic IP.

But hey, who says you even need a server? There are also serverless services in AWS, like lambda and S3. Let’s look at how they are priced:

And also:

Don’t remember what is EBS? S3? Here is a quick reminder:

EBS:

EBS is a virtual disk in the cloud. Inside the EC2 service, you will see a tab saying Elastic Block Store. EBS allows you to create storage volumes and attach them to EC2 instances. Once attached, you can create a file system on top of these volumes, run a DB, or use them in any other way you would use a block service. EBS volumes are placed in a specific AZ, where they are automatically replicated to protect you from the failure of a single component.

CloudFront:

Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers content to customers globally with low latency, high transfer speeds, all within a developer-friendly environment.

S3, S3 Glacier:

Amazon S3 is a Simple Storage Service that stores and retrieves any amount of data from anywhere on the web. S3 Glacier is used for archiving solutions. Here are some more details about its pricing:

Snowball pricing:

AWS Snowball is A PB-scale data transport solution. PB stands for petabyte, which is equal to 2 to the 50th power of bytes! So, Snowball is like a giant USB key.

Here you can see what we talked about in the key principles — Data inbound is free, data outbound is not.

Now we are reaching the Databases section. RDS is the Relational Database Service, and the non-relational DB is called DynamoDB.

RDS pricing:

Dynamo DB pricing:

So, before you go to the next section — pop quiz!
Which of the following components are billed for Amazon RDS instances?
Choose 3:

  • Storage
  • DB instance hours
  • I/O requests for Amazon RDS magnetic storage
  • Data transfer incurred in replicating data between your primary and standby, in a Multi-AZ DB instance deployment
  • Standby time

Ok, I think we earned our right for a meme break!

Now, we’ll go over the AWS services related to billing (there are 9 of those!) and then Tagging and Resource Grouping, and that’s it!


AWS Services Related to Billing

In this section we’ll talk about:

  • The difference between AWS Budgets and AWS Cost Explorer

  • What is AWS organizations and how it integrates with CloudTrail

  • The difference between AWS QuickStart and AWS LandingZone

  • What is the AWS Partner Program and how much does it cost?

  • The two AWS cost calculators and the difference between them


AWS Budgets vs AWS Cost Explorer

AWS Budgets gives you the ability to set custom budgets that alert you when your costs or usage exceed (or are forecasted to exceed) your budgeted amount.

AWS Cost Explorer has an easy-to-use interface that lets you visualize, understand, and manage your AWS costs and usage over time.

So, AWS Budgets is used to budget *costs **before* they have been incurred, and AWS Cost Explorer is used to explore *costs **after* they have been incurred.


AWS Organizations

AWS Organizations is an account management service that enables you to consolidate multiple AWS accounts into an organization that you create and centrally manage.

To clarify: you create an organization and add multiple AWS accounts into it. This is a global service, and you reach it by clicking on your username->my organizations. This service is available in two feature sets: Consolidated billing and All features.

Consolidated Billing

Consolidated billing has the following benefits:

  • One bill — You get one bill for multiple accounts.

  • Easy tracking — You can track the charges across multiple accounts and download the combined cost and usage data.

  • Volume pricing discount — You can combine the usage across all accounts in the organization to share the volume pricing discounts, Reserved Instance discounts, and Savings Plans. This can result in a lower charge for your project, department, or company than with individual standalone accounts. Unused reserved EC2 instances for EC2 are applied across the group.

  • No extra fee — Free!

All Features

All features give you full access:

When you create an organization, enabling all features is the default. With all features enabled, you can use the advanced account management features available in AWS Organizations such as integration with supported AWS services and organization management policies.

Policies in AWS Organizations enable you to apply additional types of management to the AWS accounts in your organization.

When you create organizations and then put AWS accounts behind those org units, you can apply policy either to the ou or the AWS accounts

AWS accounts, ou=organization units, and policies

AWS Organizations Best Practices

  • Enable multi-factor authentication on the root account.

  • Use a strong and complex password on the root account.

  • Paying account should be used for billing purposes only. Do not deploy resources into the paying account.

  • Linked accounts: 20 linked accounts by default, there is an ability to add more.

  • Billing Alerts:

  • When monitoring is enabled on the paying account, the billing data for all linked accounts is included.

  • You can still create billing alerts per individual account.

Pop quiz!

  • True/False: With Consolidated Billing, the Paying Account can make changes, like altering resource access, to any of the resources owned by a Linked Account.

  • Choose the features of Consolidated Billing (choose 3):

  • Charging is based per VPC

  • A single bill is issued containing the charges for all AWS Accounts

  • Multiple standalone accounts are combined and may reduce your overall bill

  • Account charges can be tracked individually.

CloudTrail

This one can be easily confused with CloudWatch, so let’s talk about the differences:

CloudTrail vs CloudWatch

  • CloudWatch monitors performance.

  • CloudTrail monitors API calls in the AWS platform: Changes to AWS env, creation of resources, etc.

How to use CloudTrail with AWS Organizations

  • CloudTrail is on a per account per region basis but can be aggregated into a single bucket belonging to the paying account.

  • CloudTrail can consolidate logs using an S3 bucket:

  • Turn on CloudTrail in paying account.

  • Create a bucket policy that allows cross-account access.
    Turn on CloudTrail in the other accounts and use the bucket in the paying account.

  • A best practice is to use a separate account for logging.


AWS Quick Start vs AWS Landing Zone

AWS Quick Start is a way of deploying environments quickly, using CloudFormation templates built by AWS Solutions Architects and AWS Partners. The resources cost money, of course — but this service is free!
https://aws-quickstart.github.io/

AWS Landing Zone —This allows you to set up a secure, multi-account AWS environment (as opposed to using *AWS Quick Start *which is just for individual accounts). It is based on AWS best practices and starts with four AWS Accounts: AWS Organisations account, Shared Services account, Log Archive account, and Security account.

[https://aws.amazon.com/solutions/implementations/aws-landing-zone/](https://aws.amazon.com/solutions/implementations/aws-landing-zone/)

Landing Zone is a solution that helps customers more quickly set up a secure, multi-account AWS environment based on AWS best practices.

AWS Landing Zone is currently in Long-term Support and will not receive any additional features. Customers interested in setting up a new landing zone should check out AWS Control Tower (but for our purposes, there is no need to dive into what AWS Control Tower is).


AWS Partner Program

The AWS Partner Network (APN) is a global community of partners that help you build, market, and sell your offerings.

As you validate your offerings with AWS and pay the APN annual fee of $2500, you can unlock access to differentiation programs, go-to-market resources, funding benefits, and more to gain recognition with customers and grow your business.

Together, partners and AWS can provide innovative solutions, solve technical challenges, win deals, and deliver value to our mutual customers.

Types of partners:

  1. Consulting: These partners design, architect, build, migrate and manage customer workloads and applications on AWS.

  2. Technology: These partners provide hardware, connectivity services, or software solutions that are either hosted on or integrated with, the AWS Cloud.

Consulting Partners:

Partner  |Practitioner Certs|Associate Certs|Prof/Specialty Certs
------------------------------------------------------------------
Select   |        2         |        2      |          2
Advanced |        4         |        4      |          4
Premier  |       10         |       10      |         10
Enter fullscreen mode Exit fullscreen mode

More information can be found at https://aws.amazon.com/partners/programs/


Different AWS Cost Calculators

AWS helps you to calculate your costs using a couple of different calculators. You won’t find them in the options of the services in the AWS console, but these come up a lot in the exam.

There are two AWS pricing tools, both have an old name and a new name (just to be sure — remember both names!):

  • AWS Simple Monthly calculator (aka AWS Pricing Calculator)

  • AWS TCO (Total Cost of Ownership) calculator (aka Migration Evaluator)

AWS Simple Monthly Calculator is used to calculate your running costs on AWS on a per month basis. It is not a comparison tool. https://docs.aws.amazon.com/pricing-calculator/latest/userguide/what-is-pricing-calculator.html pricing calculator https://calculator.aws/#/

AWS TCO Calculator is used to compare the costs of running your infrastructure on-premise vs in the AWS cloud. It will generate reports that you can give to your C-level execs to make a business case to move to the cloud.

More information can be found here.


Resource Groups & Tagging

AWS Tagging: A tag is a label that you or AWS assigns to an AWS resource. Each tag consists of a key and a value. Tags are metadata (= data about data) and you can use them to organize your resources, and cost allocation tags to track your AWS costs on a detailed level.

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Tags can sometimes be inherited. Tags from a CloudFormation stack are inherited to all the resources.

For example: {env: prod}. So, If our CloudFormation stack has this tag — all the resources that are created in that stack will have this tag as well. Also, You can’t have two tags with the key env.

Resource groups make it easy to group your resources using the tags that are assigned to them. You can group resources that share one or more tags. Resource groups contain information such as Region, Name, EmployeeID, Department.

Tags can contain specific information:

  • For EC2 — Public & Private IP Addresses

  • For ELB — Port Configurations

  • For RDS — Database, Engine, etc

Resource groups can be found in the AWS console header, next to Services.

Using Resource Groups, you can apply automation to resources tagged with specific tags. For example, stop all EC2 instances in the Ireland region. Resource Groups in combination with ***AWS Systems Manager*** allow you to control and execute automation against entire fleets of EC2 instances, all at the push of a button.

Tag Editor is a global service that allows us to discover resources and add additional tags to them as well (newer regions may take some time to be compatible with the tag editor). To clarify, the tag editor is good for finding all your tags.

Pop Quiz!
Which two of the following options best describe a Resource Group? Choose 2.

  • A resource group is a collection of resources of the same type (EC2, S3, etc.) that share one or more tags or portions of tags.
  • A resource group is a collection of resources that share one or more tags.
  • A resource group is a collection of resources of the same type (EC2, S3, etc.) that are deployed in the same Availability Zone.
  • A resource group is a collection of resources that are deployed in the same AWS Region, and that match the criteria specified in the group’s query.

That’s it!

We’ve learned a lot today! And this time, there is a lot to memorize as well!

So, a quick recap on what we talked about today, and then you can test yourself!

We started with AWS Pricing Introduction, the 4 Key Principles and the AWS Free Tier. After that, we got introduced to the Different Support Levels and the differences between them. The main and juicy part of the blog post was the pricing for individual services and the AWS services that are related to billing. Lastly, we got introduced to Resource Groups & Tagging.

Now, Test Yourself!


If you read this, you’ve reached the end of the blog post, and I would love to hear your thoughts! Here are the ways to contact me:
Facebook: https://www.facebook.com/cupofcode.blog/
Instagram: https://www.instagram.com/cupofcode.blog/
Email: cupofcode.blog@gmail.com

[https://cupofcode.blog/](https://cupofcode.blog/)

Top comments (0)