1 00:00:11,780 --> 00:00:17,850 Welcome back to Backspace Academy. In this lab we are going to be creating a 2 00:00:17,850 --> 00:00:22,949 fictitious ordering and fulfillment process and what we're going to do is, 3 00:00:22,949 --> 00:00:26,400 we're going to create a number of different Lambda functions to receive 4 00:00:26,400 --> 00:00:30,539 the order, to process the order, to check in their stock and we're going to 5 00:00:30,539 --> 00:00:36,300 coordinate all of the handling of the interaction between those Lambda 6 00:00:36,300 --> 00:00:41,520 functions as a state machine and we're going to use aws step functions to 7 00:00:41,520 --> 00:00:45,539 make that happen. So let's get into it. So starting off at 8 00:00:45,539 --> 00:00:49,890 the Lambda console. We're going to create our Lambda functions first. So again 9 00:00:49,890 --> 00:00:56,489 create function and we're going to be authoring this from scratch. We'll give 10 00:00:56,489 --> 00:01:01,260 this function a name. The first one is going to be receiving our order. So it's 11 00:01:01,260 --> 00:01:08,280 got to cut it and paste this from the lab notes. Nodejs it will be. We'll 12 00:01:08,280 --> 00:01:19,860 choose our execution role and create that function, and we've got to update 13 00:01:19,860 --> 00:01:25,189 the code for that, and we'll scroll down 14 00:01:25,490 --> 00:01:33,990 and make sure that we save that now. So I'm just going to do a quick test on it 15 00:01:33,990 --> 00:01:36,530 and see what it returns 16 00:01:46,420 --> 00:01:52,630 and run that test so that's succeeded okay and it's just going sending ordered 17 00:01:52,630 --> 00:01:56,049 order and that we haven't sent it an order number or anything like that but the 18 00:01:56,049 --> 00:02:00,430 message is right. So that seems to be behaving as it should. So order and then 19 00:02:00,430 --> 00:02:06,340 undefined because we didn't send a order number there to it. That seems okay. 20 00:02:06,340 --> 00:02:11,680 We'll create our next one. So we go to functions and create 21 00:02:11,680 --> 00:02:17,920 function, and we're going to call this one, I'll just have a look, this one's 22 00:02:17,920 --> 00:02:26,459 going to be check stock, and the same as before nodejs and use that existing role 23 00:02:26,459 --> 00:02:33,120 and the basic execution and create that function, and I'll copy this code here 24 00:02:33,120 --> 00:02:39,730 from the lab notes again and I'll paste it in. Okay so let's have a look and see 25 00:02:39,730 --> 00:02:45,190 what's going on here. So we're going to be having our handler here and it's 26 00:02:45,190 --> 00:02:49,180 going to receive that event. First thing we're going to do is we're going to 27 00:02:49,180 --> 00:02:53,170 console log out that the function is loaded successfully. So we've got a 28 00:02:53,170 --> 00:02:59,650 temporary storage here of our string so our order ID is going to be event order. 29 00:02:59,650 --> 00:03:04,930 So we need to pass a field called order in our object then 30 00:03:04,930 --> 00:03:09,700 when we send it to this function. It's going to console out that we're 31 00:03:09,700 --> 00:03:13,600 checking the stock, and so what we're doing here is we're creating a random 32 00:03:13,600 --> 00:03:19,930 number so it's going to be either 0 or 1 and depending on what that random number 33 00:03:19,930 --> 00:03:24,400 comes up with will depend on or will decide exactly whether there's stock or 34 00:03:24,400 --> 00:03:29,019 not. So again this is a fictitious process so we need to somehow make it 35 00:03:29,019 --> 00:03:33,549 realistic with a random number. So if it returns 1 then we're going to say that 36 00:03:33,549 --> 00:03:40,829 the products are in stock. If it returns 0 then the products are out of stock. 37 00:03:40,829 --> 00:03:45,760 Then we have our response the order ID and then the status which is stock 38 00:03:45,760 --> 00:03:50,889 status. So that will be either 1 or 0, and then we'll return that response. Provided 39 00:03:50,889 --> 00:03:57,040 there's no errors there and so that will be sent back to the requester and 40 00:03:57,040 --> 00:03:59,360 our requestor is going to be the 41 00:03:59,360 --> 00:04:04,970 AWS step functions process or step function service and so that will decide, make a 42 00:04:04,970 --> 00:04:12,650 decision on where to send that request further. So we just save that and we'll 43 00:04:12,650 --> 00:04:22,970 just do a quick test to make sure that's behaving reasonably how we expect it, and 44 00:04:22,970 --> 00:04:30,980 test that, and that's done. Okay so just sending a status of one and products are 45 00:04:30,980 --> 00:04:34,220 in stock. So if we run that again or run it a few times when I get a status of 46 00:04:34,220 --> 00:04:40,550 zero. So we just run it again it's still one. We'll try it again. There we go so 47 00:04:40,550 --> 00:04:44,420 the status is zero. So our random number generator is changing the status from 48 00:04:44,420 --> 00:04:49,760 zero to one depending on on what it produces so that's saved we will get out of 49 00:04:49,760 --> 00:04:57,460 that one and we'll create another function and this one will be called 50 00:04:57,460 --> 00:05:09,770 order stock. This one is so again just copying from the lab notes here their 51 00:05:09,770 --> 00:05:13,060 execution role again 52 00:05:16,030 --> 00:05:21,680 and create that function so again just copying and pasting from the lab notes 53 00:05:21,680 --> 00:05:31,370 you for our order stock. Okay so here again we've got a handle on receiving 54 00:05:31,370 --> 00:05:35,390 event and all we're doing is just sending back the order IDs just 55 00:05:35,390 --> 00:05:40,280 returning the response which will be the order ID and the message and that 56 00:05:40,280 --> 00:05:46,490 message will be order order the ID has stock ordered so nothing too spectacular 57 00:05:46,490 --> 00:05:52,850 going on there. We'll just save that and we'll test it to make sure it's behaving 58 00:05:52,850 --> 00:06:04,100 reasonably how we expect it. Okay so we'll just run that test have a look at 59 00:06:04,100 --> 00:06:08,240 that order and we haven't passed a order there so that's going to be undefined 60 00:06:08,240 --> 00:06:13,640 that's fine so order and has stock ordered so that's seems to be fine. We'll 61 00:06:13,640 --> 00:06:21,140 create our next function which is going to be called deliver order. So create the 62 00:06:21,140 --> 00:06:29,230 function and our execution role again 63 00:06:30,760 --> 00:06:37,670 soul and the basic execution and create that function and again I'll just cut 64 00:06:37,670 --> 00:06:48,020 and paste from the or copy and paste from the lab notes and again the same 65 00:06:48,020 --> 00:06:52,520 thing it's just receiving that event in that it's just going to send back order 66 00:06:52,520 --> 00:06:56,630 and then the order ID is being delivered so nothing spectacular there going as 67 00:06:56,630 --> 00:07:02,950 well we'll save that we'll test that 68 00:07:06,540 --> 00:07:12,940 so let's run that test okay so that seems fine so order and the undefined 69 00:07:12,940 --> 00:07:17,380 because of again we didn't send an order ID it's being delivered so that's 70 00:07:17,380 --> 00:07:23,740 working fine now we'll do the next one and the next one there which i think is 71 00:07:23,740 --> 00:07:31,270 the last one it's called build customer so i'll create a function and build 72 00:07:31,270 --> 00:07:44,950 customer our execution role again and create that function and again copying 73 00:07:44,950 --> 00:07:53,140 and pasting from the lab notes okay so the same thing again it's just receiving 74 00:07:53,140 --> 00:07:57,040 that event and we're just going to send back to the request of the order and 75 00:07:57,040 --> 00:08:02,740 then the order ID is being billed to the customer so we'll save that and we'll 76 00:08:02,740 --> 00:08:14,830 test that again and create that test and run that test that looks fine so order 77 00:08:14,830 --> 00:08:17,890 and then undefined we didn't send the order ID so it's going to be undefined 78 00:08:17,890 --> 00:08:23,350 that's okay so order is being billed to customer that's all working fine and so 79 00:08:23,350 --> 00:08:27,160 let's have a look so we should have five functions in. So we're receiving the 80 00:08:27,160 --> 00:08:32,650 order we're going to check it this stock if there's no stock then we're going to 81 00:08:32,650 --> 00:08:36,460 order stock if there is stock then we're going to deliver that order and then 82 00:08:36,460 --> 00:08:40,720 we're going to build the customer so we need to somehow define this process and 83 00:08:40,720 --> 00:08:46,110 we're going to do that using step functions so let's go to services 84 00:08:46,110 --> 00:08:51,130 actually before we do that, we need to create an IAM role for this step 85 00:08:51,130 --> 00:08:57,910 function so we'll go into services and then IAM. So step functions needs to 86 00:08:57,910 --> 00:09:03,180 have an IAM role to be able to invoke these Lambda functions. So we go into 87 00:09:03,180 --> 00:09:09,240 roles and create role 88 00:09:09,510 --> 00:09:21,600 and so our AWS service is going to be step functions and next permissions. So it's 89 00:09:21,600 --> 00:09:26,220 already created this for us our AWS Lambda role so it's been a bit proactive for 90 00:09:26,220 --> 00:09:31,680 us there so that's fine next tags and next to review and we'll 91 00:09:31,680 --> 00:09:39,600 give this role a name and again I'll just copy this from the lab notes so 92 00:09:39,600 --> 00:09:46,440 step functions basic execution and we'll create that role so that's done so now 93 00:09:46,440 --> 00:09:50,970 we can use that role with our step function coded services and then step 94 00:09:50,970 --> 00:10:04,199 functions and what we're going to do is just going to open up this toolbar on 95 00:10:04,199 --> 00:10:09,329 the left hand side here and we're going to go to state machines and we're going 96 00:10:09,329 --> 00:10:15,060 to create a state machine so we're going to author with code snippets who are 97 00:10:15,060 --> 00:10:21,329 going to provide our own snippets it's going to be a standard type so we get 98 00:10:21,329 --> 00:10:26,360 the code from our github repository 99 00:10:31,420 --> 00:10:39,400 okay so there is our step functions repository them on our BackSpace 100 00:10:39,400 --> 00:10:45,370 Academy github and so what we need to get here is our step function JSON so we 101 00:10:45,370 --> 00:10:55,800 just open that up and I'm just gonna click on raw here select all that and 102 00:10:55,800 --> 00:11:01,600 I'm going to scroll down here to our definition and so that's what they're 103 00:11:01,600 --> 00:11:06,160 supplied to us and it's really not very good for us at all so we just delete 104 00:11:06,160 --> 00:11:14,440 that and paste in from our from our github repository and so if we click on 105 00:11:14,440 --> 00:11:20,470 this refresh button here we can see that what is going on here so we we start we 106 00:11:20,470 --> 00:11:26,200 receive our order so receive order is a Lambda function and then check stock is 107 00:11:26,200 --> 00:11:31,660 a Lambda function and that will send either a 1 or a 0 to step functions and 108 00:11:31,660 --> 00:11:36,940 based on that we can see whether there is stock available so if it's a 1 it's 109 00:11:36,940 --> 00:11:40,360 going to go through and deliver that order and then build a customer if it's 110 00:11:40,360 --> 00:11:45,220 a 0 then it's going to do the order stock Lambda function and then it will 111 00:11:45,220 --> 00:11:48,910 fail because it cannot fulfill that order so you can see here we've got some 112 00:11:48,910 --> 00:11:54,160 red crosses here which are errors in our code so what's going on there it's 113 00:11:54,160 --> 00:11:59,560 looking for you because hover over the top of that the field value is not a 114 00:11:59,560 --> 00:12:04,450 valid Lambda function they are n so we need to get a valid Lambda function 115 00:12:04,450 --> 00:12:09,430 arn so obviously we need to go back to our Lambda console so the first one we 116 00:12:09,430 --> 00:12:17,100 need there is receive order so go into here we'll click on receive order and 117 00:12:17,100 --> 00:12:23,320 we'll select our ARN for that that's copied and we'll paste that in 118 00:12:23,320 --> 00:12:27,640 there and there we go so there all of a sudden that Red Cross is gone so the 119 00:12:27,640 --> 00:12:32,980 next one we need to do is the check stock one so again we go into our 120 00:12:32,980 --> 00:12:40,200 functions click on check stock copy the ARN for that 121 00:12:40,200 --> 00:12:46,010 and paste that one in there as well and again our Red Cross has disappeared and 122 00:12:46,010 --> 00:12:54,750 we've got another three to do there so the next one is order stock so click on 123 00:12:54,750 --> 00:13:11,010 order stock get our ARN and paste it in there next one is deliver order and we 124 00:13:11,010 --> 00:13:20,430 copy how they are in that work yep and paste that in there so there's our 125 00:13:20,430 --> 00:13:27,080 deliver order paste it in there and last one is our build customer 126 00:13:32,209 --> 00:13:35,079 copied 127 00:13:35,899 --> 00:13:43,170 okay so that looks fine everything is done there so what have we got so we've 128 00:13:43,170 --> 00:13:49,230 got our author with code snippets it's a standard type and we can format the JSON 129 00:13:49,230 --> 00:13:54,270 there if it's any problems with it looks fine I'll update this here and make sure 130 00:13:54,270 --> 00:13:57,750 there's no problems here and so that's exactly what we should be expecting 131 00:13:57,750 --> 00:14:04,610 there and there's no errors you know in our code whatsoever we'll click on next 132 00:14:05,089 --> 00:14:12,390 okay so we'll choose an existing role for IAM role so just scroll up here so 133 00:14:12,390 --> 00:14:15,360 we give it a name I'm just going to leave it as my state machine that's fine 134 00:14:15,360 --> 00:14:19,050 with me we're not going to create a new role we're going to use our existing 135 00:14:19,050 --> 00:14:23,160 role so the role that we used was his step functions basic at your new 136 00:14:23,160 --> 00:14:28,470 execution that we created before and we're not going to have logging there 137 00:14:28,470 --> 00:14:35,490 and no tags let's create that state machine okay so that seems to have 138 00:14:35,490 --> 00:14:42,600 worked perfectly okay so what we can do now is we can start that execution but 139 00:14:42,600 --> 00:14:45,990 before we do that let's have a look and see what we've got a pass to our state 140 00:14:45,990 --> 00:14:51,360 machine for it to work so just go on doing click on edit and have a look here 141 00:14:51,360 --> 00:14:55,770 so the first thing here is we're going to invoke the receive order Lambda 142 00:14:55,770 --> 00:15:01,980 function so I'm just going to get out of that now and go into a Lambda and get 143 00:15:01,980 --> 00:15:05,279 that receiver order so let's have a look at the code and see what we've got a 144 00:15:05,279 --> 00:15:10,520 pass to it so scroll down here so it's going to be looking for event and event 145 00:15:10,520 --> 00:15:17,370 order and nothing else so the only thing we need to do is we need to send a JSON 146 00:15:17,370 --> 00:15:22,650 object with an order field in there and that should be fine so just get back out 147 00:15:22,650 --> 00:15:26,700 of that now and did we go back into our step function 148 00:15:26,700 --> 00:15:32,520 we can start our execution and what we need to do is change that I'm just gonna 149 00:15:32,520 --> 00:15:37,070 cut and cut or copy and paste from the lab notes again 150 00:15:42,020 --> 00:15:46,800 okay so we just need to pass that order and just going to give it order zero 151 00:15:46,800 --> 00:15:51,300 zero one that will be fine and let's start that execution and see what 152 00:15:51,300 --> 00:15:59,820 happens so here we go so it's gone through its its work perfectly its 153 00:15:59,820 --> 00:16:04,140 receive the order it's check the stock and our random number generator it's 154 00:16:04,140 --> 00:16:09,780 generated either a zero or one this time it's generated a zero so it's sense that 155 00:16:09,780 --> 00:16:13,710 there's no stock so if ordered stock and it's failed so we can't fulfill the order 156 00:16:13,710 --> 00:16:17,850 cause there is no stock if we run it again we might get it to run on this other 157 00:16:17,850 --> 00:16:21,330 side depending on our random number generator so let's have a look another go. 158 00:16:21,330 --> 00:16:27,480 So I do a new execution and start execution let's see what happens this 159 00:16:27,480 --> 00:16:30,870 time and this time I went to the other side so we've got receive order check 160 00:16:30,870 --> 00:16:37,460 stock is stopped available and then bill customer okay so that's the input 161 00:16:37,460 --> 00:16:42,270 message auto zero and then that's that's all finished that's fine so let's have a 162 00:16:42,270 --> 00:16:49,650 look at all these so we can click on receive order and receive to order zero 163 00:16:49,650 --> 00:16:53,700 zero one which is what we sent to it and it outputted order zero zero one and 164 00:16:53,700 --> 00:17:00,990 then has been received we'll click on check stock order has been received it 165 00:17:00,990 --> 00:17:07,110 we received and then it did that random number generator that generated status 1 166 00:17:07,110 --> 00:17:13,530 and the message products are in stock and so because it checked one he goes to 167 00:17:13,530 --> 00:17:17,670 deliver order we can go into is stock available and have a look at that 168 00:17:17,670 --> 00:17:23,940 and so that received a 1 and because it received a 1 it forwarded the request 169 00:17:23,940 --> 00:17:30,270 over to deliver order we receive that and then Bill customer which is the 170 00:17:30,270 --> 00:17:36,980 final one there that went through let's run it again and see what happens again 171 00:17:38,980 --> 00:17:43,880 okay so this time it went on the zero so a check is step available or a do a 172 00:17:43,880 --> 00:17:49,520 check stock maybe so the input and then the output is that this one is the 173 00:17:49,520 --> 00:17:53,630 status of zero products are out of stock because they're out of stock we've gone 174 00:17:53,630 --> 00:17:58,250 to this side here and order the stock so it's received a stat at a zero products 175 00:17:58,250 --> 00:18:03,380 are out of stock and then it's all of that stock and then because it's 176 00:18:03,380 --> 00:18:09,620 received this then the process is stopped we can't fulfill that order so 177 00:18:09,620 --> 00:18:14,150 if we scroll down here we can see exactly what went on with our event 178 00:18:14,150 --> 00:18:20,660 execution history and so it's got a link to our receive order resource there the 179 00:18:20,660 --> 00:18:24,020 Lambda if we want to have a look at that but it's also got the Cloudwatch log so 180 00:18:24,020 --> 00:18:27,170 if there was any problem there we can always have a look at those Cloudwatch 181 00:18:27,170 --> 00:18:35,450 logs for that receive order so we click on that it should open up the 182 00:18:35,450 --> 00:18:41,060 Cloudwatch logs for receive order so here we go so it's e receive order and our log 183 00:18:41,060 --> 00:18:45,620 group for that and so we can see here we click on that we should have our log 184 00:18:45,620 --> 00:18:49,640 stream so there it is there so function loaded successively returning response 185 00:18:49,640 --> 00:18:55,670 order blah blah blah so that's all working fine okay before we finish up 186 00:18:55,670 --> 00:19:01,070 with the lab what I want to do is just run through very quickly how the step 187 00:19:01,070 --> 00:19:06,260 functions code works and how we format this JSON object so it's understandable 188 00:19:06,260 --> 00:19:10,940 by the step function service so what I've done here is I've copied the code 189 00:19:10,940 --> 00:19:17,060 the JSON code or the step function is JSON file the contents of that and I've 190 00:19:17,060 --> 00:19:21,740 put it here into a JSON editor now you can get to this editor just go to JSON 191 00:19:21,740 --> 00:19:26,630 editor online org or else just Google JSON editor online and you'll find it 192 00:19:26,630 --> 00:19:31,310 there easy enough so I pasted it in here on the left hand side and I've just 193 00:19:31,310 --> 00:19:35,930 clicked copy to copy it over on to the right hand side and display that as a 194 00:19:35,930 --> 00:19:42,440 tree so you can select up here is a code or tree and that allows us to visually 195 00:19:42,440 --> 00:19:45,890 see what's going on so the first line here is we've got comments so that's 196 00:19:45,890 --> 00:19:50,100 obviously just a comment describing what the state machine is doing 197 00:19:50,100 --> 00:19:55,250 and that's optional so if we leave it out it will still run fine 198 00:19:55,250 --> 00:20:00,240 the next one there is start at that is not optional that you must have a 199 00:20:00,240 --> 00:20:07,740 starting state so it starts at the state of receive order so obviously we need to 200 00:20:07,740 --> 00:20:14,160 define what's receive order is so these states which is next is also compulsory 201 00:20:14,160 --> 00:20:18,480 you need to have that in there so obviously we need to have our receive 202 00:20:18,480 --> 00:20:22,410 order state so just going on here on to the right hand side here so we can see 203 00:20:22,410 --> 00:20:28,160 we've got started receive order and then our different states that we've got them 204 00:20:28,160 --> 00:20:36,300 I'll just expand that out so there is our receive order state and it's got a 205 00:20:36,300 --> 00:20:42,660 type of task now type is also compulsory so you need to have that in it that is 206 00:20:42,660 --> 00:20:48,240 required and if you don't have type in a task definition then that will not work 207 00:20:48,240 --> 00:20:53,160 also so you need to have started you need to have these states and within 208 00:20:53,160 --> 00:20:58,710 that stage you need to have a type so the type is a task and we need to define 209 00:20:58,710 --> 00:21:03,240 what the resource is and so the resource is our Lambda function and then what is 210 00:21:03,240 --> 00:21:06,390 the next state that we're going to and that is going to be check stock so it's 211 00:21:06,390 --> 00:21:10,950 pretty self-explanatory and in check stock we've got type tasks and then the 212 00:21:10,950 --> 00:21:17,520 check stock lambda AR n and the next one is is stock available and so again 213 00:21:17,520 --> 00:21:23,970 that's type task and in is stock available this is of type choice so it's 214 00:21:23,970 --> 00:21:30,000 not a task it's a choice and then we have an array of choices so let's expand 215 00:21:30,000 --> 00:21:34,760 that array and that will give us a list of choices so the first choice said is 216 00:21:34,760 --> 00:21:41,580 if they are variable status so what happens here is that our check stock 217 00:21:41,580 --> 00:21:47,400 will send back a JSON object which will have the order ID but it will also have 218 00:21:47,400 --> 00:21:52,950 a field status and that will be either 0 or 1 depending on what our random number 219 00:21:52,950 --> 00:21:59,910 generator generated so if that status comes back numeric equals 1 so it comes 220 00:21:59,910 --> 00:22:05,790 back as 1 our next state will be deliver order so let's go down to 221 00:22:05,790 --> 00:22:12,720 deliver order and that's a task this time so we define the task the lambda AR 222 00:22:12,720 --> 00:22:18,180 n for it deliver order the next one there is going to be bill customer so 223 00:22:18,180 --> 00:22:22,550 let's have a look at Bill customer so again that's a tight that's a task and 224 00:22:22,550 --> 00:22:28,620 the resource the land AR n but there is no next we don't have a next year we got 225 00:22:28,620 --> 00:22:33,810 an end and the end is true so it's going to come to bill customer and then it's 226 00:22:33,810 --> 00:22:38,060 going to stop so the statement state machine it will finish at that point and 227 00:22:38,060 --> 00:22:44,130 it won't continue to do any more functions so that is if numeric equals 228 00:22:44,130 --> 00:22:50,220 one if the status equals one so let's just minimize these again so let's say 229 00:22:50,220 --> 00:22:59,430 look at the other choice here so if the status is zero we go to order stock so 230 00:22:59,430 --> 00:23:03,720 we'll have a look at order stock so again this is a task we have our order 231 00:23:03,720 --> 00:23:12,120 stock AR n but the next one is fail so let's go to fail now this is of type 232 00:23:12,120 --> 00:23:17,940 fail so it's not a choice it's not a task this is a fail so this will come up 233 00:23:17,940 --> 00:23:22,710 in red on our flow chart when it's when it's invoked or when it when it gets to 234 00:23:22,710 --> 00:23:27,480 this state and then we need to define a cause so the cause is it's a description 235 00:23:27,480 --> 00:23:34,080 of what happened and so that is how it all works so quite self-explanatory if 236 00:23:34,080 --> 00:23:39,120 you wanted to see a little bit more on this there's a tiny bit of documentation 237 00:23:39,120 --> 00:23:44,160 but it's a very very simple language to use or simple format to use it's not 238 00:23:44,160 --> 00:23:50,040 really much going on you just need to know really task choice and and fail and 239 00:23:50,040 --> 00:23:54,210 they're the basic types of the states pretty straightforward so I hope you've 240 00:23:54,210 --> 00:23:57,450 got a lot out of it so let's move on now and start to clean 241 00:23:57,450 --> 00:24:03,540 up everything and that's a pretty good introduction to AWS step functions so I 242 00:24:03,540 --> 00:24:06,960 hope you got a lot out of it so what we can do now is we can clean all this up 243 00:24:06,960 --> 00:24:11,850 so we need to get rid of this state function or this state machine go to our 244 00:24:11,850 --> 00:24:16,160 state machines select it and delete it 245 00:24:17,310 --> 00:24:22,000 so that's near deleting and we'll just go to our Lambda functions and delete 246 00:24:22,000 --> 00:24:24,960 each one of those as well 247 00:24:48,669 --> 00:24:53,049 and there we go so they're deleted and our state machinery refreshes screen 248 00:24:53,049 --> 00:24:56,889 should be deleted as well okay that brings us to the end hope you've got a 249 00:24:56,889 --> 00:25:01,889 lot out of it and I look forward to seeing you in the next one