1 00:00:00,360 --> 00:00:01,193 ‫All right, 2 00:00:01,193 --> 00:00:02,310 ‫let's talk about cost optimization. 3 00:00:02,310 --> 00:00:04,230 ‫So what it is, we exactly know what it is, 4 00:00:04,230 --> 00:00:07,290 ‫is stability to run systems, to deliver business value 5 00:00:07,290 --> 00:00:09,360 ‫but at the lowest price point possible. 6 00:00:09,360 --> 00:00:10,680 ‫That makes a lot of sense. 7 00:00:10,680 --> 00:00:13,710 ‫Now, design principles will adapt a consumption mode. 8 00:00:13,710 --> 00:00:15,990 ‫So pay for only what you use. 9 00:00:15,990 --> 00:00:19,080 ‫So for example, AWS Lambda is one of these services. 10 00:00:19,080 --> 00:00:21,660 ‫If you don't use AWS Lambda, you don't pay for it, 11 00:00:21,660 --> 00:00:23,910 ‫whereas RDS, if you don't use your database, 12 00:00:23,910 --> 00:00:24,750 ‫you still pay for it 13 00:00:24,750 --> 00:00:26,760 ‫because you've provisioned your database. 14 00:00:26,760 --> 00:00:29,340 ‫So it's a really interesting trade off here. 15 00:00:29,340 --> 00:00:31,620 ‫Measure overall efficiency, use CloudWatch. 16 00:00:31,620 --> 00:00:34,620 ‫Are you using your resources effectively? 17 00:00:34,620 --> 00:00:36,480 ‫Then we have a small ad for AWS, 18 00:00:36,480 --> 00:00:38,490 ‫but the idea is that if you move to the cloud 19 00:00:38,490 --> 00:00:41,730 ‫then you stop spending money on data center operations 20 00:00:41,730 --> 00:00:43,860 ‫because AWS does the infrastructure for you, 21 00:00:43,860 --> 00:00:45,540 ‫and they just allow you to focus 22 00:00:45,540 --> 00:00:47,580 ‫on your applications, your systems. 23 00:00:47,580 --> 00:00:50,280 ‫And you need to analyze and attribute expenditure. 24 00:00:50,280 --> 00:00:53,640 ‫So that means if you don't use tags on your AWS resources, 25 00:00:53,640 --> 00:00:55,470 ‫you're gonna have to have a lot of trouble figuring out 26 00:00:55,470 --> 00:00:57,510 ‫which application is costing you a lot of money. 27 00:00:57,510 --> 00:00:59,730 ‫So using tags ensures that you're able 28 00:00:59,730 --> 00:01:01,380 ‫to track the cost of each application 29 00:01:01,380 --> 00:01:02,610 ‫and optimize them over time, 30 00:01:02,610 --> 00:01:04,650 ‫and get a ROI based on how much money 31 00:01:04,650 --> 00:01:06,450 ‫it generates for your business. 32 00:01:06,450 --> 00:01:09,240 ‫Finally, use managed application level services 33 00:01:09,240 --> 00:01:11,040 ‫to reduce the cost of ownership. 34 00:01:11,040 --> 00:01:12,690 ‫So that means that because managed services 35 00:01:12,690 --> 00:01:13,713 ‫operate at cloud scale, 36 00:01:13,713 --> 00:01:17,100 ‫they can offer such a lower cost per transaction or service, 37 00:01:17,100 --> 00:01:17,970 ‫and that's really something 38 00:01:17,970 --> 00:01:19,290 ‫you have to remember about the cloud. 39 00:01:19,290 --> 00:01:21,300 ‫They operate at cloud scale. 40 00:01:21,300 --> 00:01:24,150 ‫I've seen, I've read news about people 41 00:01:24,150 --> 00:01:25,500 ‫who are like three engineers, 42 00:01:25,500 --> 00:01:27,240 ‫only three of them, AWS engineers, 43 00:01:27,240 --> 00:01:30,660 ‫and they manage an application that serves 5 million people. 44 00:01:30,660 --> 00:01:32,520 ‫I mean, imagine that three people 45 00:01:32,520 --> 00:01:34,800 ‫manage a global application on AWS 46 00:01:34,800 --> 00:01:36,930 ‫for 5 million people just because they're able 47 00:01:36,930 --> 00:01:39,720 ‫to leverage the cloud and operate at cloud scale. 48 00:01:39,720 --> 00:01:42,690 ‫So in terms of cost optimization, what do we get? 49 00:01:42,690 --> 00:01:45,210 ‫Making sure we know what cost does something. 50 00:01:45,210 --> 00:01:49,650 ‫So budgets, custom research reports, cost explorer, and, 51 00:01:49,650 --> 00:01:52,230 ‫for example, Reserved Instance reporting, 52 00:01:52,230 --> 00:01:54,000 ‫making sure that if we do reserve an instance, 53 00:01:54,000 --> 00:01:55,230 ‫we're actually using them 54 00:01:55,230 --> 00:01:58,920 ‫and not just paying for unused Reserved Instances. 55 00:01:58,920 --> 00:01:59,940 ‫Cost-effective resources. 56 00:01:59,940 --> 00:02:01,410 ‫So are we using the right stuff? 57 00:02:01,410 --> 00:02:03,420 ‫For example, can we uses spot instances? 58 00:02:03,420 --> 00:02:04,980 ‫They're considerably cheaper. 59 00:02:04,980 --> 00:02:07,500 ‫Yes, they do have some trade-offs, but can we use them? 60 00:02:07,500 --> 00:02:09,330 ‫Can we use cost-effective resources? 61 00:02:09,330 --> 00:02:12,720 ‫Or if we know we're using an EC2 Instance for over a year, 62 00:02:12,720 --> 00:02:15,600 ‫maybe three years, because we provision a database on it, 63 00:02:15,600 --> 00:02:17,580 ‫can we use Reserved Instances? 64 00:02:17,580 --> 00:02:20,040 ‫That would be a great way of saving money. 65 00:02:20,040 --> 00:02:20,873 ‫AWS Glacier. 66 00:02:20,873 --> 00:02:23,130 ‫So are we basically putting our archives 67 00:02:23,130 --> 00:02:26,040 ‫in the lowest price point possible? 68 00:02:26,040 --> 00:02:28,380 ‫And Glacier is the lowest price point possible. 69 00:02:28,380 --> 00:02:29,940 ‫Are we matching supply and demand? 70 00:02:29,940 --> 00:02:31,470 ‫So are we not over provisioning? 71 00:02:31,470 --> 00:02:34,530 ‫So again, Auto Scaling, or maybe AWS Lambda 72 00:02:34,530 --> 00:02:36,900 ‫if you're using serverless infrastructure. 73 00:02:36,900 --> 00:02:38,490 ‫And are we optimizing over time? 74 00:02:38,490 --> 00:02:41,520 ‫So getting information from Trusted Advisor or again, 75 00:02:41,520 --> 00:02:43,620 ‫looking at our Cost and Usage Report, 76 00:02:43,620 --> 00:02:45,360 ‫or even reading the News Blogs. 77 00:02:45,360 --> 00:02:47,550 ‫Let me just share with you a small story. 78 00:02:47,550 --> 00:02:49,620 ‫There was this ELB feature, 79 00:02:49,620 --> 00:02:53,520 ‫and it allowed to use HTTP and HTTPS traffic going in, 80 00:02:53,520 --> 00:02:57,150 ‫but you couldn't do redirect of HTTP to HTTPS before. 81 00:02:57,150 --> 00:02:58,860 ‫And so you had to spin up an application 82 00:02:58,860 --> 00:03:00,540 ‫that was doing the redirect behind the scenes, 83 00:03:00,540 --> 00:03:03,510 ‫and that application was costing me a little bit of money. 84 00:03:03,510 --> 00:03:04,860 ‫But then reading the News Blog, 85 00:03:04,860 --> 00:03:07,320 ‫they said "now you can, straight from the ELB, 86 00:03:07,320 --> 00:03:10,110 ‫configure redirect of HTTP to HTTPS." 87 00:03:10,110 --> 00:03:10,943 ‫And that was great. 88 00:03:10,943 --> 00:03:12,990 ‫It saved me, you know, a bit of money every month 89 00:03:12,990 --> 00:03:14,040 ‫just with that one feature. 90 00:03:14,040 --> 00:03:17,040 ‫So reading the news does allow you to optimize your cost 91 00:03:17,040 --> 00:03:19,080 ‫and make sure you have the right price point. 92 00:03:19,080 --> 00:03:20,850 ‫Last story is, for example, 93 00:03:20,850 --> 00:03:22,830 ‫if you run an application on DynamoDB 94 00:03:22,830 --> 00:03:25,320 ‫but it's really inactive, it's a really slow application, 95 00:03:25,320 --> 00:03:27,720 ‫or you don't need to use a lot of operations, 96 00:03:27,720 --> 00:03:29,430 ‫maybe you're way better off using 97 00:03:29,430 --> 00:03:32,040 ‫the on-demand feature of DynamoDB 98 00:03:32,040 --> 00:03:36,090 ‫instead of using the reserve capacity, WCU, RCU, and so on. 99 00:03:36,090 --> 00:03:38,580 ‫Okay, so that's it just for small anecdotes, 100 00:03:38,580 --> 00:03:39,413 ‫but I hope that helps. 101 00:03:39,413 --> 00:03:40,680 ‫We've seen all the pillars now, 102 00:03:40,680 --> 00:03:42,060 ‫and I hope you understand better 103 00:03:42,060 --> 00:03:43,980 ‫the AWS Well-Architected Framework. 104 00:03:43,980 --> 00:03:46,650 ‫Again, the exam will not ask you deep questions on it, 105 00:03:46,650 --> 00:03:48,210 ‫but it's good as a solution architect 106 00:03:48,210 --> 00:03:49,260 ‫to understand it overall. 107 00:03:49,260 --> 00:03:51,000 ‫And if you're really curious about it, 108 00:03:51,000 --> 00:03:53,070 ‫I encourage you to read the Whitepaper. 109 00:03:53,070 --> 00:03:53,903 ‫Okay, that's it. 110 00:03:53,903 --> 00:03:55,390 ‫I will see you in the next lecture.