1 00:00:00,370 --> 00:00:01,870 Okay, so now let's have a look 2 00:00:01,870 --> 00:00:03,430 at Lifecycle rules. 3 00:00:03,430 --> 00:00:05,070 For this, I'm gonna go into Management 4 00:00:05,070 --> 00:00:07,550 and I can define a lifecycle rule. 5 00:00:07,550 --> 00:00:08,763 So let me create one. 6 00:00:10,000 --> 00:00:11,573 I will call this one DemoRule, 7 00:00:12,500 --> 00:00:15,760 and we can either play it to a specific scope 8 00:00:15,760 --> 00:00:18,030 within our buckets or all the objects. 9 00:00:18,030 --> 00:00:19,340 I will apply to all the objects, 10 00:00:19,340 --> 00:00:22,040 just for simplicity sake in this video. 11 00:00:22,040 --> 00:00:25,114 So we have five different kinds of lifecycle rule actions, 12 00:00:25,114 --> 00:00:27,096 we can transition current versions 13 00:00:27,096 --> 00:00:30,195 of objects between storage classes or previous versions. 14 00:00:30,195 --> 00:00:33,010 So what do we mean by current and previous? 15 00:00:33,010 --> 00:00:33,843 Well, for currents 16 00:00:33,843 --> 00:00:36,400 we mean the object that is the most recent 17 00:00:36,400 --> 00:00:37,940 if we have enabled versioning, 18 00:00:37,940 --> 00:00:41,090 and for previous we mean all the other versions of an object 19 00:00:41,090 --> 00:00:43,300 if we have enabled versioning. 20 00:00:43,300 --> 00:00:47,040 Then we can expire current versions of objects, 21 00:00:47,040 --> 00:00:49,770 permanently deletes previous version of objects, 22 00:00:49,770 --> 00:00:51,600 and finally delete expired, 23 00:00:51,600 --> 00:00:53,990 delete markers or incomplete multipart uploads. 24 00:00:53,990 --> 00:00:56,410 So lots of different options. 25 00:00:56,410 --> 00:00:57,243 But let's just do this one, 26 00:00:57,243 --> 00:00:59,630 we are going to transition current versions 27 00:00:59,630 --> 00:01:02,100 of objects between storage classes. 28 00:01:02,100 --> 00:01:04,910 And we can say, we can transition objects 29 00:01:05,961 --> 00:01:10,130 into the standard-IA storage class, after thirty days, 30 00:01:10,130 --> 00:01:13,470 then we can move it into Intelligent-Tiering after, 31 00:01:13,470 --> 00:01:14,730 seventy days. 32 00:01:14,730 --> 00:01:18,495 And then move it into maybe Glacier after, 33 00:01:18,495 --> 00:01:20,540 one hundred and eighty days 34 00:01:20,540 --> 00:01:22,900 and Glacier Deep Archive after, 35 00:01:22,900 --> 00:01:25,850 let's say three hundred and sixty five days. 36 00:01:25,850 --> 00:01:27,500 Okay. 37 00:01:27,500 --> 00:01:28,900 And there is probably 38 00:01:28,900 --> 00:01:30,820 because I'm not doing my cost correctly, 39 00:01:30,820 --> 00:01:32,040 I get a small warning. 40 00:01:32,040 --> 00:01:33,500 Ah if you transition oh yeah, 41 00:01:33,500 --> 00:01:35,670 if you transition small objects into Glacier 42 00:01:35,670 --> 00:01:37,320 or Glacier Deep Archive, 43 00:01:37,320 --> 00:01:38,640 this will increase costs, 44 00:01:38,640 --> 00:01:41,020 so obviously if you do transition objects there, 45 00:01:41,020 --> 00:01:43,010 make sure they're ,big enough. 46 00:01:43,010 --> 00:01:43,843 Okay, great. 47 00:01:44,977 --> 00:01:48,430 So next I can also expire current object version 48 00:01:48,430 --> 00:01:50,060 ah current versions of objects, 49 00:01:50,060 --> 00:01:51,810 So we're seeing okay. 50 00:01:51,810 --> 00:01:55,790 After an object is created maybe after seven hundred days, 51 00:01:55,790 --> 00:01:57,700 then please delete it. 52 00:01:57,700 --> 00:02:00,860 And we could also add a previous version transition 53 00:02:00,860 --> 00:02:01,980 just for fun. 54 00:02:01,980 --> 00:02:03,830 And we can say it's, 55 00:02:03,830 --> 00:02:07,990 move it into Glacier after sixty days 56 00:02:07,990 --> 00:02:09,100 because if it's approved version 57 00:02:09,100 --> 00:02:11,580 maybe we don't want to access it. 58 00:02:11,580 --> 00:02:12,950 We don't plan on accessing this. 59 00:02:12,950 --> 00:02:15,460 Okay, so I acknowledge this as well. 60 00:02:15,460 --> 00:02:18,164 And so we can look at the timeline summary. 61 00:02:18,164 --> 00:02:20,529 And so for current version actions, 62 00:02:20,529 --> 00:02:22,860 day zero, the objects are uploaded, 63 00:02:22,860 --> 00:02:24,880 day thirty they are transitioned automatically 64 00:02:24,880 --> 00:02:26,060 into Standard-IA, 65 00:02:26,060 --> 00:02:28,380 day seventy into Intelligent-Tiering, 66 00:02:28,380 --> 00:02:30,610 day one eighty to Glacier and finally, 67 00:02:30,610 --> 00:02:32,950 three sixty five Glacier Deep Archive. 68 00:02:32,950 --> 00:02:35,850 Day seven hundred they will expire. 69 00:02:35,850 --> 00:02:37,880 And then for previous version actions, 70 00:02:37,880 --> 00:02:39,310 this year they become noncurrent 71 00:02:39,310 --> 00:02:42,710 and day sixty they are transitioned to Glacier. 72 00:02:42,710 --> 00:02:47,360 Just, you know, a simple ah fun lifecycle rule to set up 73 00:02:47,360 --> 00:02:49,330 but this shows you the whole power of lifecycle rules 74 00:02:49,330 --> 00:02:51,430 you can set up multiple ones per buckets 75 00:02:51,430 --> 00:02:53,770 on different filters with different rules. 76 00:02:53,770 --> 00:02:56,260 And this allows you to really optimize your costs 77 00:02:56,260 --> 00:02:58,910 in AWS for Amazon S3. 78 00:02:58,910 --> 00:03:00,050 So I hope you liked it, 79 00:03:00,050 --> 00:03:02,000 and I will see you in the next lecture.