‫So now let's talk pricing models in AWS.
‫AWS has four different pricing models.
‫There is pay as you go,
‫where you pay for what you use.
‫You remain agile,
‫because you can start and stop
‫and delete resources whenever you want,
‫responsive,
‫and you can scale to meet demands as demand happens.
‫There's also a model where you save when you reserve.
‫So this is to minimize risk
‫and to get a predictable budget
‫and to comply with long-term requirements.
‫For example, we can do instance reservations
‫for EC2, DynamoDB, ElastiCache, RDS and Redshift.
‫Also, you get to pay less by using more.
‫You get volume-based discounts,
‫for example, on Amazon S3.
‫And as AWS grows their infrastructure,
‫they will have some cost savings,
‫and they will pass them onto you.
‫So AWS is very famous for doing cost reductions
‫every month or every year,
‫which is really good,
‫because as their infrastructure grow,
‫and more people use AWS,
‫they have volume and scale,
‫and therefore, they will pass on that economy of scale
‫onto you to get discounts.
‫On top of it, in AWS,
‫some services are going to be free,
‫and other will be part of the free tier.
‫So I AM is free,
‫VPC is free,
‫and consolidated billing is free as well.
‫If you use the Elastic Beanstalk, CloudFormation and ASG,
‫they are free services.
‫But whatever these services creates,
‫obviously, you need to pay.
‫So Elastic Beanstalk,
‫if you create an application load balancer
‫and EC2 instance,
‫it has to be paid by you.
‫And your Auto Scaling group obviously,
‫when it adds more EC2 instances,
‫you're going to pay for those.
‫And obviously, what is created through CloudFormation,
‫you will have to pay as well.
‫Those are free tier that you can find at this address.
‫And for example, as part of the free tier,
‫you get a t2.micro instance for a year,
‫or you get S3, EBS, ELB and data transfer for free
‫at up to a certain amounts.
‫Okay. So we have the free tier here,
‫and we can see that there are kinds of free tiers.
‫There is featured.
‫There is 12 months free
‫which is when you start a new account.
‫There is always free
‫which is going to be free even after 12 months.
‫And trials, for example, the 30-day trials
‫for GuardDuty, for SageMaker, Inspector and so on.
‫So here, I think it's really helpful for you
‫to have a look at it and to see what is free.
‫I think the most important ones are going to be Amazon EC2,
‫Amazon S3, Amazon RDS and so on.
‫So now let's do a deep dive into the pricing
‫for different services.
‫For example, for EC2,
‫with the On-Demand,
‫you are only charged for what you use,
‫which is the number of instances
‫as well as the instance configuration,
‫what's the capacity number of CPU and RAM,
‫the region you in,
‫the operating system and the software you install
‫on your EC2 instance,
‫the instance type and instance size.
‫And if you're using a load balancer, for example,
‫how long the load balancer will run
‫and the amount of data processed by your load balancer.
‫Also, you can enable detailed monitoring
‫on your EC2 instance to get CloudWatch metrics every minute
‫instead of every five minutes,
‫and you will have to pay for that as well.
‫So now let's talk about the different models
‫for pricing on EC2.
‫The first one is with On-Demand instances.
‫And you're going to have a minimum billing time
‫of 60 seconds.
‫And then you're going to pay per second
‫for Linux and Windows
‫or per hour for your other EC2 instances.
‫But if you know you're going to use your instances
‫for a long time,
‫then you should use Reserved instances,
‫and it's going to give you up to 75% discount
‫compared to the On-Demand price for the hourly rate.
‫But you need to commit for a long period of time,
‫so either one or three-year commitment.
‫And you get more discounts if you pay early.
‫So you can pay everything upfront,
‫and you get more discounts.
‫Or partial upfront,
‫so just a part of the total amounts.
‫Or no upfront.
‫But this is going to give you a bit less discounts.
‫You also have Spot instances,
‫and you get up to 90% discount
‫compared to your On-Demand hourly rate.
‫And what this means is that
‫you're going to bid for unused capacity
‫in the EC2 instances.
‫And so because you use these unused capacity,
‫you can get it at a very, very aggressive discount.
‫But with Spot instances,
‫you run the risk of losing them
‫in case someone is willing to pay a bit more
‫for your Spot instances.
‫You can also have Dedicated Host
‫which can be On-Demand and can be Reserved as well.
‫And this is a tendency way of running EC2.
‫This means that you are going to run a loan on these hosts,
‫because they're dedicated to you.
‫And finally, there's another component called Savings Plan
‫which is an alternative to all these things above.
‫And I'm going to describe Savings Plans to you
‫in a future lecture.
‫So don't worry about it too much.
‫Next, we have Lambda and ECS,
‫again under compute category.
‫So Lambda, you pay per API call,
‫and you pay per duration of your Lambda functions
‫times the number of the amount of RAM
‫that you have assigned for your Lambda function.
‫For ECS, you get an EC2 launch type model.
‫That means that you don't get any fees for using ECS,
‫but any time you start an EC2 instance
‫underlying your ECS cluster,
‫then you will have to pay for that EC2 instance.
‫For Fargate, it sort of different,
‫because we don't manage EC2 instances,
‫and therefore, we're going to pay for each container
‫for the amount of CPU and memory
‫that gets assigned for your container.
‫Now let's talk about the pricing
‫of the storage on Amazon S3.
‫So as we saw, there are different storage classes
‫that you need to know for the exam.
‫We have S3 Standard, S3 Infrequent Access, S3 One-Zone IA,
‫S3 Intelligent Tiering, Glacier and Glacier Deep Archive.
‫As well on S3, you're going to pay
‫for the number and the size of the objects.
‫And the price is going to be tiered,
‫so the more volume you have,
‫the more objects and the more,
‫the bigger the objects are,
‫the more discounts you're going to get.
‫Then if you do request in and out of Amazon S3,
‫you're going to pay for these requests.
‫You're also going to pay for any data transfer
‫out of the S3 region.
‫So sending data into S3 is free,
‫but retrieving data from S3,
‫you will have to pay something.
‫If you use S3 Transfer Acceleration,
‫it is also a cost that has to be incurred for it.
‫And any time you do a Lifecycle transition
‫between the storage classes defined above,
‫then you're going to have to pay for it.
‫A similar service is going to be EFS.
‫Because EFS, you're going pay per use.
‫It will also have an infrequent access tier
‫and lifecycle rules.
‫A different way to do storage pricing is with EBS.
‫So with EBS,
‫we're going to have pricing based on the volume type
‫that we've provisioned,
‫so the performance of that volume.
‫Then the size of the volume in gigabytes
‫that you provision in advance.
‫Okay, you don't pay per use with EBS.
‫You say, yes, I want one hundred gigabyte EBS volume,
‫and you're going to pay for it
‫regardless whether your use it or not.
‫Then the IOPS, so the performance of your volumes.
‫So if it's a General Purpose SSD, it's included.
‫But if it's Provisioned IOPS,
‫you're going to pay for the IOPS provision.
‫And for Magnetic, the number of requests.
‫Then you're going to pay for your EBS snapshots.
‫So the more snapshots you get, the more you pay.
‫So you're gonna get a cost
‫per gigabyte of snapshot per month.
‫And then data transfer.
‫Any data transfer out of EBS is going to be paid
‫and is going to be tiered for volume discounts.
‫But anything you write into EBS inbound is going to be free.
‫Now let's talk about database pricing,
‫for example, for RDS.
‫So it's a per hour billing.
‫And based on the database you use,
‫you have different pricing.
‫So the engine type, the size, the memory class.
‫Then for an RDS database,
‫you can either have On-Demand as a purchase type,
‫or you can reserve an RDS database
‫which is a very smart thing to do,
‫for example, for one or three years,
‫and you can pay upfront for that RDS database.
‫Then if you do RDS backups,
‫you're gonna have to pay for those.
‫But usually, there is no charge for backup storage
‫up to 100% of your total database storage for a region.
‫And in the experience of AWS,
‫that means that all in all,
‫the backup storage should be free
‫if your database is not all the way up to full.
‫Then for RDS,
‫you're going to pay obviously for the underlying storage
‫in gigabytes per month
‫based on the EBS volume that you provision
‫for your RDS database.
‫You're going to pay for the number of input
‫and output requests per month.
‫The deployment type.
‫Is it a Single AZ or is it Multi AZ,
‫in which case you have to pay for two RDS databases.
‫And as well as the data transfer.
‫So any data transfer out of your database
‫is going to be paid and tiered based on volume.
‫And any transfer into your database is free.
‫Now let's talk about CloudFront.
‫So CloudFront is a CDN,
‫and it is global,
‫so therefore, the pricing is going to be different
‫based on where the content is served from.
‫So you have different pricing based on usually continents.
‫So for example, America, Europe, South America,
‫Japan, Australia, India and so on.
‫And this is in the table
‫that you can see in this slide down.
‫And then the more you're going to use CloudFront
‫in a specific edge location,
‫the more you're going to get discounts,
‫and you're going to get to an aggregated bill
‫for all the edge locations.
‫You're going to pay for any data transfer
‫out of CloudFront,
‫but not for in.
‫In is always free.
‫Finally, you're going to get a paid bill
‫based on the number of requests
‫that are made into CloudFront.
‫They are counted.
‫Okay. So in AWS finally,
‫you need to understand the networking costs
‫which are, to be honest, very, very complicated.
‫But I try to simplify it in this slide.
‫So you have a region,
‫and we have two AZ.
‫And say we have an EC2 instance in one AZ.
‫Any traffic going inbound of your EC2 instance
‫is going to be free.
‫And then say you have another EC2 instance
‫in the same AZ.
‫If these two EC2 instance talk together,
‫then the traffic is free using the private IP.
‫Now say you have another easy three instance in another AZ.
‫Then if you use the public IP of the EC2 instances
‫to talk to one another,
‫then the traffic will have to go through the internet,
‫and you're going to pay 2 cents per gigabytes.
‫But if you're using the private IP instead
‫to make these EC2 instance talk to one another,
‫then it's going to be 1 cents per gigabyte.
‫So overall, I would recommend you always use the private IP
‫if you can to have communication between your EC2 instances.
‫And if you happen to have EC2 instance in another region,
‫then you're going to get a fee of 2 cents per gigabyte
‫as an inter-region cost.
‫Okay.
‫So summary is that you should use a private IP
‫instead of a public IP
‫for good savings and better network performance.
‫And then if possible,
‫if you want to have the maximum amount of cost saving,
‫use one Availability Zone,
‫but you sacrifice obviously the high availability.
‫So there's a trade-off here
‫between cost and high availability.
‫So that's it for an overview of pricing on AWS.
‫You won't be testing on the actual details of each service,
‫but it's good for you to understand
‫the reasoning behind cost in AWS,
‫because this is what the exam will test you on
‫to understand how at a high level it cost
‫to use some AWS services.
‫So hope you like this.
‫And I will see you in the next lecture.