1 00:00:07,180 --> 00:00:08,840 - Now let's take a look at a demo 2 00:00:08,840 --> 00:00:12,343 of writing a Hello World in AWS Lambda. 3 00:00:13,630 --> 00:00:17,320 From the AWS management console dashboard, 4 00:00:17,320 --> 00:00:22,320 we can go to Lambda, of course, by searching here. 5 00:00:22,930 --> 00:00:27,180 We'll go ahead and take a look at the Lambda dashboard. 6 00:00:27,180 --> 00:00:29,750 You can see, if we go to the dashboard, 7 00:00:29,750 --> 00:00:34,140 it gives us a summary of what's happening within Lambda, 8 00:00:34,140 --> 00:00:36,940 in this particular account, in this region. 9 00:00:36,940 --> 00:00:41,723 So currently in my account, I only have one function so far. 10 00:00:42,840 --> 00:00:44,710 We can also see account level metrics 11 00:00:44,710 --> 00:00:48,910 across all Lambda functions in that particular region, 12 00:00:48,910 --> 00:00:52,390 you know, errors, invocations, total duration, 13 00:00:52,390 --> 00:00:55,183 concurrent executions, all of those kinds of things. 14 00:00:56,120 --> 00:00:56,953 And then of course, 15 00:00:56,953 --> 00:01:00,370 we have access to all of our functions here. 16 00:01:00,370 --> 00:01:04,720 You can see I only have one and we can go ahead 17 00:01:04,720 --> 00:01:06,930 and from here we can create a function. 18 00:01:06,930 --> 00:01:10,240 We could also create a function from the dashboard as well. 19 00:01:10,240 --> 00:01:15,110 So if we create a function here in the management console, 20 00:01:15,110 --> 00:01:19,120 then we're kind of limited, because if we're authoring 21 00:01:19,120 --> 00:01:22,092 from scratch right here in the console, 22 00:01:22,092 --> 00:01:25,480 then we're essentially going to be typing code 23 00:01:25,480 --> 00:01:27,980 in the console, which means that we won't really be able to 24 00:01:27,980 --> 00:01:30,270 include any dependencies. 25 00:01:30,270 --> 00:01:33,620 So if we need dependencies, other libraries, 26 00:01:33,620 --> 00:01:36,870 so for example, if you're writing in Node.js 27 00:01:36,870 --> 00:01:38,941 and you wanted to include npm modules, 28 00:01:38,941 --> 00:01:42,040 then you would have to do all of that locally, 29 00:01:42,040 --> 00:01:44,060 wrap all of that up in a zip file, 30 00:01:44,060 --> 00:01:45,593 and then upload the zip file. 31 00:01:47,150 --> 00:01:49,130 So here we're just going to keep it simple 32 00:01:49,130 --> 00:01:51,530 and write a very simple Hello World. 33 00:01:51,530 --> 00:01:52,563 We'll call that. 34 00:01:55,450 --> 00:01:59,100 And I'm going to use the Python 2.7, 35 00:01:59,100 --> 00:02:01,060 and of course you can see that it supports 36 00:02:01,060 --> 00:02:06,060 quite a few different languages, .Net, Go, Java, 37 00:02:06,350 --> 00:02:08,420 different run times of Node.js, 38 00:02:08,420 --> 00:02:11,830 different run times of Python, Ruby, and so on. 39 00:02:11,830 --> 00:02:14,020 You can also use a custom runtime. 40 00:02:14,020 --> 00:02:17,500 So we'll go ahead and choose Python, and then of course, 41 00:02:17,500 --> 00:02:19,340 now that we have the runtimes selected, 42 00:02:19,340 --> 00:02:24,270 we also need the role to be selected. 43 00:02:24,270 --> 00:02:25,860 So we're going to choose an existing role. 44 00:02:25,860 --> 00:02:29,750 We could also create a new role from a template 45 00:02:29,750 --> 00:02:32,150 or create a custom role, but I already have one. 46 00:02:32,150 --> 00:02:36,080 And I have one here called hello World Lambda. 47 00:02:36,080 --> 00:02:37,230 So let me show you that real quick. 48 00:02:37,230 --> 00:02:39,040 Before we actually get to the function, 49 00:02:39,040 --> 00:02:41,360 let me show you that role because it is really important 50 00:02:41,360 --> 00:02:45,210 to understand that what this says here is that 51 00:02:45,210 --> 00:02:47,430 Lambda must be able to assume this role, 52 00:02:47,430 --> 00:02:51,420 and the role must have Amazon CloudWatch Logs permissions. 53 00:02:51,420 --> 00:02:55,890 So we are using roles to delegate permissions 54 00:02:55,890 --> 00:02:58,630 to the Lambda service, so that this function 55 00:02:58,630 --> 00:03:03,550 is capable of communicating with other AWS resources, 56 00:03:03,550 --> 00:03:05,140 essentially on our behalf. 57 00:03:05,140 --> 00:03:10,140 So I'm going to open IAM here in a new tab, 58 00:03:10,250 --> 00:03:12,070 and I'll go to roles, 59 00:03:12,070 --> 00:03:13,230 I just want to show you this real quick, 60 00:03:13,230 --> 00:03:14,363 it's already created. 61 00:03:15,440 --> 00:03:17,999 Let me search for my hello World role, there it is, 62 00:03:17,999 --> 00:03:20,520 and you'll just see here that I've attached, 63 00:03:20,520 --> 00:03:24,100 I have this role which is specifically for Lambda. 64 00:03:24,100 --> 00:03:26,977 If we look at what we call the trust relationship, 65 00:03:26,977 --> 00:03:30,390 you'll see that this one is for the Lambda service. 66 00:03:30,390 --> 00:03:32,245 So we're saying that the Lambda service 67 00:03:32,245 --> 00:03:37,245 is able to assume this role, not any other service, 68 00:03:37,870 --> 00:03:41,083 not any other account, but specifically the Lambda service. 69 00:03:42,170 --> 00:03:45,508 And so, the permissions that we've granted would be, 70 00:03:45,508 --> 00:03:48,050 one we have a policy called AWSLambdaS3 71 00:03:49,750 --> 00:03:53,320 where we're essentially allowing this particular Lambda 72 00:03:53,320 --> 00:03:57,110 function to, essentially, download anything from S3. 73 00:03:57,110 --> 00:04:00,080 Now you'll notice that what's lacking here 74 00:04:00,080 --> 00:04:03,150 is the ability to list objects in the bucket. 75 00:04:03,150 --> 00:04:07,440 So the function would not be able to explore S3 76 00:04:07,440 --> 00:04:09,710 and just go and find things to download, 77 00:04:09,710 --> 00:04:13,650 the function would have to know the URL to begin with. 78 00:04:13,650 --> 00:04:18,650 And then, down here, we have the Lambda basic execution. 79 00:04:20,183 --> 00:04:23,664 LambdaBasicExecutionRole essentially allows this function 80 00:04:23,664 --> 00:04:27,647 to create a log group within CloudWatch Logs, 81 00:04:27,647 --> 00:04:32,330 CreateLogStreams, and then PutLogEvents, 82 00:04:32,330 --> 00:04:34,520 and you can see here it's specifically for 83 00:04:35,430 --> 00:04:38,000 this particular function, hello World. 84 00:04:38,000 --> 00:04:42,290 So now that we have the role chosen, 85 00:04:42,290 --> 00:04:45,482 and that particular role has the right permissions, 86 00:04:45,482 --> 00:04:47,803 now we can go ahead and create the function. 87 00:04:49,248 --> 00:04:53,560 And we're going to skip over the designer for now. 88 00:04:53,560 --> 00:04:56,084 Let's go down to function code. 89 00:04:56,084 --> 00:04:59,060 And again, right here it's saying edit code inline, 90 00:04:59,060 --> 00:05:02,860 and again the runtime is Python 2.7, 91 00:05:02,860 --> 00:05:06,040 and now before we actually make any changes to this, 92 00:05:06,040 --> 00:05:08,420 let's just first take a look at what they've given us. 93 00:05:08,420 --> 00:05:11,280 You can see that they've already given us 94 00:05:11,280 --> 00:05:14,560 a bit of a hello World, but let's just take a minute 95 00:05:14,560 --> 00:05:15,910 to understand what's going on here. 96 00:05:15,910 --> 00:05:18,100 You'll see that, whether or not you know Python, 97 00:05:18,100 --> 00:05:19,020 that's pretty easy to see 98 00:05:19,020 --> 00:05:22,900 that we are essentially defining a function here. 99 00:05:22,900 --> 00:05:25,530 So all Lambda functions, 100 00:05:25,530 --> 00:05:27,460 regardless of the language that you write it in, 101 00:05:27,460 --> 00:05:30,490 have to have a handler, and you'll see here 102 00:05:30,490 --> 00:05:35,370 that we are calling this one Lambda_function.lambda_handler. 103 00:05:35,370 --> 00:05:37,506 So this right here, Lambda_function.py, 104 00:05:37,506 --> 00:05:40,455 you'll notice that this is essentially the name of the file, 105 00:05:40,455 --> 00:05:45,455 so it's essentially name of the file dot Lambda handler, 106 00:05:46,360 --> 00:05:47,210 and you'll see up here 107 00:05:47,210 --> 00:05:50,110 Lambda handler is the name of this function, right? 108 00:05:50,110 --> 00:05:53,600 So we're telling the Python, excuse me, 109 00:05:53,600 --> 00:05:56,930 we're informing the Lambda service 110 00:05:56,930 --> 00:05:59,872 that when our function is to be executed, 111 00:05:59,872 --> 00:06:04,280 it is to execute this particular function. 112 00:06:04,280 --> 00:06:06,560 Now we could, if we wanted to, 113 00:06:06,560 --> 00:06:11,560 we could define other functions up here, right? 114 00:06:11,900 --> 00:06:14,073 That would essentially be private. 115 00:06:16,100 --> 00:06:18,700 We could define my function here, 116 00:06:18,700 --> 00:06:20,460 and some other function down below, 117 00:06:20,460 --> 00:06:24,216 and all of those would be essentially including in here, 118 00:06:24,216 --> 00:06:26,780 but we're saying out of all the functions, 119 00:06:26,780 --> 00:06:28,890 that might be defined, 120 00:06:28,890 --> 00:06:31,890 this is the one that needs to be executed 121 00:06:31,890 --> 00:06:35,523 when our Lambda function is invoked. 122 00:06:38,320 --> 00:06:41,230 And then of course, that particular handler 123 00:06:42,330 --> 00:06:46,030 will always receive two objects, the event object, 124 00:06:46,030 --> 00:06:50,570 and remember that Lambda can be triggered by events 125 00:06:50,570 --> 00:06:54,190 from a number of different places, from API Gateway, 126 00:06:54,190 --> 00:06:57,960 from S3 Dynamodb, Simple Queue Service, Canesis. 127 00:06:57,960 --> 00:07:00,233 So for example, if you were to leverage 128 00:07:00,233 --> 00:07:05,233 S3 event notifications and you upload a file to S3, 129 00:07:06,420 --> 00:07:10,080 once that object is written and that upload has finished, 130 00:07:10,080 --> 00:07:14,200 then S3 will send an event notification to Lamdba. 131 00:07:14,200 --> 00:07:16,792 And all of the information about that event, 132 00:07:16,792 --> 00:07:19,920 where it came from, any other pertinent meta data, 133 00:07:19,920 --> 00:07:22,520 will be included in that event object. 134 00:07:22,520 --> 00:07:25,060 And then the context object is essentially used, 135 00:07:25,060 --> 00:07:28,400 it can be used to indicate a success or a failure. 136 00:07:28,400 --> 00:07:30,740 You can see here that we don't necessarily have to do that. 137 00:07:30,740 --> 00:07:35,040 We can just return, but you can gain more control 138 00:07:35,040 --> 00:07:36,730 over the execution of this function 139 00:07:36,730 --> 00:07:39,870 by leveraging the context object. 140 00:07:39,870 --> 00:07:41,940 So before we actually run this, 141 00:07:41,940 --> 00:07:44,050 I just want to make one small change. 142 00:07:44,050 --> 00:07:46,570 I'm going to add. 143 00:07:46,570 --> 00:07:49,900 I'm going to import one more thing, the print function, 144 00:07:49,900 --> 00:07:54,900 and here, we're going to say print loading, 145 00:07:59,400 --> 00:08:02,650 so that we can see these things in the logs. 146 00:08:02,650 --> 00:08:05,210 So remember that Lambda will always write logs 147 00:08:05,210 --> 00:08:08,870 to CloudWatch Logs and anything that we print, 148 00:08:08,870 --> 00:08:11,600 to standard out or to the console, 149 00:08:11,600 --> 00:08:13,950 will be captured by CloudWatch Logs. 150 00:08:13,950 --> 00:08:17,580 So we can leave ourselves some debugging information 151 00:08:17,580 --> 00:08:19,390 by essentially printing here. 152 00:08:19,390 --> 00:08:21,770 All of that will be captured by CloudWatch Logs. 153 00:08:21,770 --> 00:08:25,310 We could echo this particular event here, right? 154 00:08:25,310 --> 00:08:27,222 We could do something like this. 155 00:08:27,222 --> 00:08:29,930 We could say receive that event, 156 00:08:29,930 --> 00:08:32,410 and then essentially, use the Json library 157 00:08:32,410 --> 00:08:34,776 to dump that out so that we can see 158 00:08:34,776 --> 00:08:39,776 the contents of that event object in our logs, right? 159 00:08:40,220 --> 00:08:42,380 And so we'll go ahead, down here 160 00:08:42,380 --> 00:08:45,537 we can also assign environment variables 161 00:08:45,537 --> 00:08:48,310 and then of course, just like most resources, 162 00:08:48,310 --> 00:08:50,245 we can set tags for that, 163 00:08:50,245 --> 00:08:52,510 and then if we needed to change the role, 164 00:08:52,510 --> 00:08:53,440 we could, down here, 165 00:08:53,440 --> 00:08:57,930 if we wanted to update the role to something else, 166 00:08:57,930 --> 00:08:59,470 then we could do that there. 167 00:08:59,470 --> 00:09:04,200 We can also define how much memory this needs. 168 00:09:04,200 --> 00:09:06,950 So, also it's worth noting, that your function 169 00:09:06,950 --> 00:09:10,290 is allocated CPU proportional to the memory. 170 00:09:10,290 --> 00:09:12,630 So if your function needs more CPU, 171 00:09:12,630 --> 00:09:14,510 then you have to give it more memory. 172 00:09:14,510 --> 00:09:17,540 The two of them are not separated. 173 00:09:17,540 --> 00:09:19,730 There is an intrinsic relationship 174 00:09:19,730 --> 00:09:21,136 between the amount of memory you use 175 00:09:21,136 --> 00:09:23,340 and the CPU that you get, right? 176 00:09:23,340 --> 00:09:25,986 So remember that the more memory you use, 177 00:09:25,986 --> 00:09:30,040 and the more time you use, the more you pay. 178 00:09:30,040 --> 00:09:34,210 So it's important, not every function needs 179 00:09:34,210 --> 00:09:38,470 3 gigs worth of memory, and not every function needs 180 00:09:38,470 --> 00:09:41,730 five minutes worth of a time out. 181 00:09:41,730 --> 00:09:44,250 So if you just end up doing those kinds of things, 182 00:09:44,250 --> 00:09:47,550 by default, you could very significantly 183 00:09:47,550 --> 00:09:50,580 end up artificially inflating your bill, 184 00:09:50,580 --> 00:09:52,870 and I've seen that happen with clients I've worked with 185 00:09:52,870 --> 00:09:55,160 who had kind of a, they just didn't realize 186 00:09:55,160 --> 00:09:56,750 what was going on and they had a habit of 187 00:09:56,750 --> 00:09:58,602 just always setting the time out to five minutes, 188 00:09:58,602 --> 00:10:02,490 but then not forcing their function to exit 189 00:10:02,490 --> 00:10:06,074 when it could earlier, so it meant that their functions 190 00:10:06,074 --> 00:10:08,280 were just always running for five minutes, 191 00:10:08,280 --> 00:10:11,970 even though the processing may have completed in 1 second. 192 00:10:11,970 --> 00:10:15,640 And so by doing that, they were spending 193 00:10:15,640 --> 00:10:17,660 a lot more money than they needed to. 194 00:10:17,660 --> 00:10:19,723 So really take time to understand, 195 00:10:19,723 --> 00:10:23,300 we may not need five minutes worth of execution, 196 00:10:23,300 --> 00:10:27,420 we may only need three seconds or maybe we need ten, right? 197 00:10:27,420 --> 00:10:28,480 Now it doesn't mean that you're going 198 00:10:28,480 --> 00:10:29,700 to be charged for ten seconds, 199 00:10:29,700 --> 00:10:32,190 you are charged for what actually runs. 200 00:10:32,190 --> 00:10:34,091 So it's important that our function, 201 00:10:34,091 --> 00:10:36,560 right if we go back up to our function, 202 00:10:36,560 --> 00:10:37,780 it's important that our function 203 00:10:37,780 --> 00:10:42,780 either return or call the context fail, as soon as it can. 204 00:10:46,830 --> 00:10:50,660 And so here, hello World certainly doesn't need 3 gigs 205 00:10:50,660 --> 00:10:53,160 worth of memory, we'll go all the way down. 206 00:10:53,160 --> 00:10:56,460 So 128 megs is still more than enough, 207 00:10:56,460 --> 00:10:58,120 but it's the lowest limit. 208 00:10:58,120 --> 00:11:02,023 We could give Lambda functions access to our VPC. 209 00:11:02,890 --> 00:11:07,509 If we wanted Lambda to communicate with EC2 Instances 210 00:11:07,509 --> 00:11:10,520 in our VPC, we could do that as well, 211 00:11:10,520 --> 00:11:12,540 and we could choose a subnet 212 00:11:12,540 --> 00:11:14,443 such as our application servers. 213 00:11:15,513 --> 00:11:18,090 We could do that if we wanted to 214 00:11:18,090 --> 00:11:19,750 and we could give it a security group. 215 00:11:19,750 --> 00:11:24,020 Well I'll just go ahead and close all of that for now. 216 00:11:24,020 --> 00:11:27,020 So that can be really helpful when you want Lambda 217 00:11:27,020 --> 00:11:30,230 to communicate with something, perhaps an application server 218 00:11:30,230 --> 00:11:35,230 or a load balancer, or a relational database 219 00:11:36,580 --> 00:11:38,870 from the RDS service. 220 00:11:38,870 --> 00:11:43,790 And then of course, we could also say we want to reserve 221 00:11:43,790 --> 00:11:46,300 a certain amount of concurrency for this function. 222 00:11:46,300 --> 00:11:48,800 So remember that right here, what this is showing, 223 00:11:48,800 --> 00:11:50,720 is that I have an account limit 224 00:11:50,720 --> 00:11:55,720 of 1000 concurrent executions of functions, 225 00:11:55,870 --> 00:11:58,110 and that's across all functions. 226 00:11:58,110 --> 00:12:00,870 And so if I felt like this particular function 227 00:12:00,870 --> 00:12:04,150 needed more concurrency than other functions, 228 00:12:04,150 --> 00:12:06,460 then I could reserve that and say well I want 229 00:12:06,460 --> 00:12:10,400 to reserve a certain amount of concurrency, right? 230 00:12:10,400 --> 00:12:13,040 And then you can always lift, this is a soft limit, 231 00:12:13,040 --> 00:12:15,630 you can lift this number by submitting a ticket 232 00:12:15,630 --> 00:12:16,833 to Amazon support. 233 00:12:17,720 --> 00:12:21,210 So if you have a very busy application, 234 00:12:21,210 --> 00:12:23,530 you may very well need 2000 235 00:12:23,530 --> 00:12:27,270 or maybe even 10000 concurrent executions. 236 00:12:27,270 --> 00:12:29,980 Amazon does this, these kind of soft limits, 237 00:12:29,980 --> 00:12:32,458 to limit resource consumption. 238 00:12:32,458 --> 00:12:35,470 So let's go ahead and save that, 239 00:12:35,470 --> 00:12:37,010 and then now that it's saved, 240 00:12:37,010 --> 00:12:39,930 we can actually go ahead and test that, 241 00:12:39,930 --> 00:12:42,680 and we can select a test event. 242 00:12:42,680 --> 00:12:46,483 So remember that the event will come 243 00:12:49,480 --> 00:12:51,351 from whatever is triggering this function. 244 00:12:51,351 --> 00:12:54,478 So when you're testing, you need a test event. 245 00:12:54,478 --> 00:12:56,990 So I can go ahead and configure one. 246 00:12:56,990 --> 00:12:59,070 And I'm just going to go ahead here 247 00:12:59,070 --> 00:13:04,063 and get rid of all of these things and say message Hello. 248 00:13:09,170 --> 00:13:10,770 And I'll call that one Hello. 249 00:13:10,770 --> 00:13:12,990 So we've created this new test event 250 00:13:12,990 --> 00:13:15,910 and we can use this to mock other events, 251 00:13:15,910 --> 00:13:20,250 so if we wanted to test against like an S3 notification, 252 00:13:20,250 --> 00:13:22,921 or a Dynamodb notification, then we can take 253 00:13:22,921 --> 00:13:25,820 one of those notifications, we can generate one, 254 00:13:25,820 --> 00:13:29,320 and then take that data and put it in here 255 00:13:29,320 --> 00:13:31,980 as something to continually test against. 256 00:13:31,980 --> 00:13:33,860 So I'll go ahead and create that. 257 00:13:33,860 --> 00:13:37,650 And now, we have, if we go back up here to test, 258 00:13:37,650 --> 00:13:42,200 we can use the hello test event to say test, 259 00:13:42,200 --> 00:13:44,420 and of course it failed, so let's see. 260 00:13:44,420 --> 00:13:48,324 This happens. This is, we're not always perfect. 261 00:13:48,324 --> 00:13:51,582 So again, it's saying it has a syntax error, 262 00:13:51,582 --> 00:13:56,240 and then now we get access to the log output. 263 00:13:56,240 --> 00:13:59,728 Syntax error on line two, so let's come back down here. 264 00:13:59,728 --> 00:14:04,728 I think I might need to put this up here. 265 00:14:04,880 --> 00:14:05,713 Let me try that. 266 00:14:08,850 --> 00:14:10,290 All right, so we can save that again, 267 00:14:10,290 --> 00:14:12,310 very quickly and easily we can make a change 268 00:14:12,310 --> 00:14:17,210 to our function, we can save it, and we could also, 269 00:14:17,210 --> 00:14:19,910 you'll notice here that it's giving us a link to the logs. 270 00:14:19,910 --> 00:14:21,930 We could also go to CloudWatch Logs. 271 00:14:21,930 --> 00:14:23,940 We'll come back to that. 272 00:14:23,940 --> 00:14:27,073 So let's go ahead and we'll close this and try that again. 273 00:14:29,251 --> 00:14:32,640 And there we go, it said result succeeded. 274 00:14:32,640 --> 00:14:34,370 So it was just a matter of, 275 00:14:34,370 --> 00:14:39,370 I ended up putting that from in the wrong place. 276 00:14:39,750 --> 00:14:40,670 And again, that happens, 277 00:14:40,670 --> 00:14:45,290 you just learn from the error and move on. 278 00:14:45,290 --> 00:14:50,290 So this is what was returned, and then down here, 279 00:14:50,990 --> 00:14:55,120 you can see here's where we printed our loading 280 00:14:55,120 --> 00:14:59,000 and here's where we said received event message hello. 281 00:14:59,000 --> 00:15:00,294 So this is our test event. 282 00:15:00,294 --> 00:15:03,622 And then it also tells us, in the logs, 283 00:15:03,622 --> 00:15:06,960 how long the function actually ran for. 284 00:15:06,960 --> 00:15:11,910 So it only ran for 0.52 milliseconds, but we were billed, 285 00:15:11,910 --> 00:15:15,620 right it says here we were billed for 100 milliseconds 286 00:15:15,620 --> 00:15:18,970 using 128 megs worth of memory. 287 00:15:18,970 --> 00:15:23,140 So again, the greater these two numbers combined, 288 00:15:23,140 --> 00:15:24,760 the more we pay. 289 00:15:24,760 --> 00:15:27,440 So if we wanted to take a look at the logs, 290 00:15:27,440 --> 00:15:30,090 we could click here, and that would take us directly 291 00:15:30,090 --> 00:15:32,790 to CloudWatch Logs, and then you can see 292 00:15:32,790 --> 00:15:36,530 this is the streams for hello World. 293 00:15:36,530 --> 00:15:41,490 And you'll see it's ordered here by last event time. 294 00:15:41,490 --> 00:15:42,971 So if we were to take a look, 295 00:15:42,971 --> 00:15:46,463 let's go back to this one here, I think we'll see the error. 296 00:15:47,470 --> 00:15:49,740 Nope, nothing in that one, let's go back. 297 00:15:49,740 --> 00:15:52,630 Maybe it was this one here? That was something else. 298 00:15:52,630 --> 00:15:54,690 Let's take a look here. There we go. 299 00:15:54,690 --> 00:15:59,690 So here is the same information that we saw earlier 300 00:16:00,860 --> 00:16:03,990 where it's saying loading, received event, and so on. 301 00:16:03,990 --> 00:16:08,850 So we'll go back to Lambda and we can close that. 302 00:16:08,850 --> 00:16:10,425 And then of course, we could say, 303 00:16:10,425 --> 00:16:15,093 let's go back to our functions and there we go, 304 00:16:15,093 --> 00:16:17,526 in just a few minutes we've created a hello World 305 00:16:17,526 --> 00:16:22,526 and we created a, by choosing our runtime being Python 2.7, 306 00:16:23,650 --> 00:16:26,040 we specified memory and a time out. 307 00:16:26,040 --> 00:16:31,040 We added some code and we created a test object, 308 00:16:31,520 --> 00:16:34,320 a test event, and then we tested the code 309 00:16:34,320 --> 00:16:37,080 and verified that the code was working 310 00:16:37,080 --> 00:16:41,050 through the logs that the Lambda service gave us. 311 00:16:41,050 --> 00:16:44,933 So that's how we can write functions in AWS Lambda.