1 00:00:00,640 --> 00:00:01,860 ‫Okay so let's explore this 2 00:00:01,860 --> 00:00:06,380 ‫serverless application repository and this is a way for us 3 00:00:06,380 --> 00:00:09,300 ‫to share and deploy serverless applications quickly 4 00:00:09,300 --> 00:00:12,890 ‫so we have our own application but also we have 5 00:00:12,890 --> 00:00:15,320 ‫public applications so public applications 6 00:00:15,320 --> 00:00:18,640 ‫are applications that verified authors will publish 7 00:00:18,640 --> 00:00:21,740 ‫on the SAR or the serverless application repository 8 00:00:21,740 --> 00:00:22,573 ‫for us to use. 9 00:00:22,573 --> 00:00:24,620 ‫For example, there is a hello world function right here 10 00:00:24,620 --> 00:00:26,560 ‫that I can click on and deploys. 11 00:00:26,560 --> 00:00:31,090 ‫So if I click on it I can deploy hello world version 1.0.4 12 00:00:31,090 --> 00:00:34,190 ‫and it gives me the template, the source code URL, 13 00:00:34,190 --> 00:00:37,010 ‫the author which is AWS which is also AWS verified author 14 00:00:37,010 --> 00:00:38,290 ‫that makes a lot of sense, 15 00:00:38,290 --> 00:00:40,610 ‫the templates of the function itself, 16 00:00:40,610 --> 00:00:44,280 ‫as well as a read me file and the application settings. 17 00:00:44,280 --> 00:00:48,670 ‫So all of these can be used to deploy public applications. 18 00:00:48,670 --> 00:00:52,769 ‫So for example, this one, I'll ask demo identity names 19 00:00:52,769 --> 00:00:55,983 ‫so for the hello world, and I click on deploy. 20 00:00:57,620 --> 00:01:00,580 ‫And here we go, our application is being deployed 21 00:01:00,580 --> 00:01:02,860 ‫so as we can see we have a deployment 22 00:01:02,860 --> 00:01:06,790 ‫and the deployment is in progress so from seven seconds ago 23 00:01:06,790 --> 00:01:08,170 ‫and it comes from the same template 24 00:01:08,170 --> 00:01:10,010 ‫so this creates logical resources 25 00:01:10,010 --> 00:01:11,900 ‫so if I go into the same templates 26 00:01:11,900 --> 00:01:13,060 ‫this is a CloudFormation stack 27 00:01:13,060 --> 00:01:15,880 ‫so click on CloudFormation stack and I am taken 28 00:01:15,880 --> 00:01:18,060 ‫to the CloudFormation UI where I can see 29 00:01:18,060 --> 00:01:20,730 ‫that's my application is being created 30 00:01:20,730 --> 00:01:23,800 ‫in progress right now and now the create is complete. 31 00:01:23,800 --> 00:01:26,460 ‫So that means that my application is good to go. 32 00:01:26,460 --> 00:01:28,850 ‫We have a hello world and within the hello world, 33 00:01:28,850 --> 00:01:31,730 ‫we have a Lambda function and if I click on it 34 00:01:31,730 --> 00:01:33,730 ‫I can see that this application has been deployed. 35 00:01:33,730 --> 00:01:35,710 ‫It belongs to an application which was deployed 36 00:01:35,710 --> 00:01:37,710 ‫using the serverless repository. 37 00:01:37,710 --> 00:01:40,560 ‫And I could go ahead and test this application 38 00:01:40,560 --> 00:01:43,610 ‫so for this, I will scroll down, click on tests, 39 00:01:43,610 --> 00:01:47,160 ‫new events, and tests, and my function succeeded 40 00:01:47,160 --> 00:01:47,993 ‫and it says value one. 41 00:01:47,993 --> 00:01:49,070 ‫So this is great. 42 00:01:49,070 --> 00:01:51,120 ‫We've deployed our first Lambda function 43 00:01:51,120 --> 00:01:53,430 ‫from the serverless application repository. 44 00:01:53,430 --> 00:01:55,510 ‫And that could be enough, but I want to show you 45 00:01:55,510 --> 00:01:57,890 ‫how to publish your own private application 46 00:01:57,890 --> 00:02:00,100 ‫on the serverless application repository. 47 00:02:00,100 --> 00:02:02,610 ‫So to do so let's open CloudShell 48 00:02:02,610 --> 00:02:05,400 ‫because we'll create a SAM application directly 49 00:02:05,400 --> 00:02:07,030 ‫from CloudShell. 50 00:02:07,030 --> 00:02:09,730 ‫Okay the other thing is that's all the commands I have 51 00:02:09,730 --> 00:02:14,500 ‫are in the code of the course under zero steps. 52 00:02:14,500 --> 00:02:17,550 ‫So let me go ahead and put the windows next to each other. 53 00:02:17,550 --> 00:02:20,830 ‫And so first we're going to initialize a SAM application 54 00:02:20,830 --> 00:02:25,100 ‫using the runtime Python and let's do 3.8, 3.8 okay? 55 00:02:25,100 --> 00:02:28,870 ‫So I'm going to copy this and paste it and press enter. 56 00:02:28,870 --> 00:02:31,040 ‫Now the SAM (indistinct) is by default 57 00:02:31,040 --> 00:02:32,740 ‫installed on CloudShell so we don't need to 58 00:02:32,740 --> 00:02:34,580 ‫install it beforehand. 59 00:02:34,580 --> 00:02:36,270 ‫So I use a quick start template. 60 00:02:36,270 --> 00:02:40,210 ‫It'll be zip and I'll press enter for the SAM app name 61 00:02:40,210 --> 00:02:42,780 ‫and then we'll have a hello world example 62 00:02:42,780 --> 00:02:45,760 ‫so just one, one, one, one, and we're good to go. 63 00:02:45,760 --> 00:02:49,420 ‫Okay so now if I do LS we have a SAM app okay? 64 00:02:49,420 --> 00:02:52,800 ‫And so what I'm going to do is just go in it, 65 00:02:52,800 --> 00:02:55,180 ‫in this SAM app and let's explore. 66 00:02:55,180 --> 00:02:58,840 ‫We have events, hello world, template.yaml, and tests. 67 00:02:58,840 --> 00:03:00,970 ‫Now we need to edit this template.yaml file 68 00:03:00,970 --> 00:03:04,600 ‫so I will do nano template.yaml so it's not installed 69 00:03:04,600 --> 00:03:09,600 ‫so sudo yam install -Y nano to install the nano package. 70 00:03:10,560 --> 00:03:13,370 ‫And then let's try again so nano template.yaml 71 00:03:13,370 --> 00:03:14,810 ‫and here we go we can update this file. 72 00:03:14,810 --> 00:03:18,330 ‫So now we just need to go ahead and add a few blocks. 73 00:03:18,330 --> 00:03:20,100 ‫So to do this, I'm going to go into 74 00:03:20,100 --> 00:03:22,100 ‫my modifications.yaml file 75 00:03:22,100 --> 00:03:23,560 ‫and we're going to add a few sections. 76 00:03:23,560 --> 00:03:26,070 ‫The first one is metadata, and this is metadata 77 00:03:26,070 --> 00:03:28,230 ‫around the serverless application repository 78 00:03:28,230 --> 00:03:30,870 ‫so we'll have to specify it's name, it's description, 79 00:03:30,870 --> 00:03:34,040 ‫who is the author, as well as the semantic version. 80 00:03:34,040 --> 00:03:37,780 ‫So I copy this and then I paste it, paste, 81 00:03:37,780 --> 00:03:39,760 ‫and the block has been added. 82 00:03:39,760 --> 00:03:41,500 ‫And then the other thing is we need to add 83 00:03:41,500 --> 00:03:43,740 ‫a parametric block to specify a parameter 84 00:03:43,740 --> 00:03:47,230 ‫for the template itself and the lambda function. 85 00:03:47,230 --> 00:03:50,473 ‫So I'm going to paste this and we have one parameter 86 00:03:50,473 --> 00:03:53,460 ‫called custom name with type string. 87 00:03:53,460 --> 00:03:55,890 ‫And then finally we need to edit our Lambda function. 88 00:03:55,890 --> 00:03:57,120 ‫And so for the lambda function 89 00:03:57,120 --> 00:03:59,300 ‫we need to add some environment variables 90 00:03:59,300 --> 00:04:00,690 ‫under the properties. 91 00:04:00,690 --> 00:04:02,950 ‫So under the properties right here 92 00:04:02,950 --> 00:04:05,520 ‫I'm going to add this block of environment variable 93 00:04:05,520 --> 00:04:07,670 ‫which is going to set an environment variable 94 00:04:07,670 --> 00:04:10,061 ‫named custom name that is referencing the parameter 95 00:04:10,061 --> 00:04:14,020 ‫custom name from CloudFormation so I'll copy this 96 00:04:14,020 --> 00:04:17,120 ‫and under properties right here under the runtime, 97 00:04:17,120 --> 00:04:20,620 ‫I'm going to add a new line, spaces, 98 00:04:20,620 --> 00:04:24,620 ‫and then I'm going to paste this in, paste, 99 00:04:24,620 --> 00:04:26,080 ‫and this is perfect. 100 00:04:26,080 --> 00:04:30,080 ‫So control X Y enter, and we're good to go 101 00:04:30,080 --> 00:04:34,210 ‫so we can make sure that our template.yaml is correct 102 00:04:34,210 --> 00:04:36,090 ‫by just cutting it and as we can see 103 00:04:36,090 --> 00:04:38,930 ‫we have the environment and we have the metadata 104 00:04:38,930 --> 00:04:40,860 ‫so this is good to go. 105 00:04:40,860 --> 00:04:43,830 ‫Next we can go to this more steps. 106 00:04:43,830 --> 00:04:45,790 ‫Okay so once we've done this we need to create 107 00:04:45,790 --> 00:04:49,010 ‫an S3 buckets to deploy our applications 108 00:04:49,010 --> 00:04:50,660 ‫so I'll make an S3 bucket 109 00:04:50,660 --> 00:04:55,530 ‫I'll call it stephane-sar-demo and 2021 110 00:04:59,640 --> 00:05:01,320 ‫and it's been created. 111 00:05:01,320 --> 00:05:04,210 ‫And next we're going to put a bucket policy 112 00:05:04,210 --> 00:05:06,730 ‫using the file policy.json in here 113 00:05:06,730 --> 00:05:07,780 ‫so we need to create that file 114 00:05:07,780 --> 00:05:11,740 ‫so nano.policy.json to create this file 115 00:05:11,740 --> 00:05:14,270 ‫and you can find the file contents right here. 116 00:05:14,270 --> 00:05:18,310 ‫So it's a bucket policy which allows us to 117 00:05:18,310 --> 00:05:20,680 ‫allow the serverless application repository 118 00:05:20,680 --> 00:05:23,030 ‫to get objects from this S3 buckets 119 00:05:23,030 --> 00:05:25,480 ‫so to get the code that we're going to deploy. 120 00:05:25,480 --> 00:05:28,970 ‫And then we need to specify the bucket name 121 00:05:28,970 --> 00:05:32,490 ‫which I did forget obviously so let's go back and find it. 122 00:05:32,490 --> 00:05:35,760 ‫Stephane-sar-demo-2021 so let's do it again. 123 00:05:35,760 --> 00:05:37,850 ‫I'll copy it and I'll just edit in here 124 00:05:37,850 --> 00:05:42,850 ‫so stephane-sar-demo-2021 paste this and we are good to go. 125 00:05:48,830 --> 00:05:51,050 ‫So now this file is created. 126 00:05:51,050 --> 00:05:54,080 ‫So we have the right bucket names, stephane-sar-demo-2021 127 00:05:54,080 --> 00:05:55,840 ‫as well as the right policy. 128 00:05:55,840 --> 00:05:58,550 ‫So we're going to apply this policy on our S3 bucket 129 00:05:58,550 --> 00:06:00,110 ‫by using an API call. 130 00:06:00,110 --> 00:06:04,130 ‫So we'll use the S3 API put bucket policy. 131 00:06:04,130 --> 00:06:08,710 ‫We need again to update the bucket name here 132 00:06:08,710 --> 00:06:12,720 ‫and then the policy file and paste press enter 133 00:06:12,720 --> 00:06:13,930 ‫and it's been applied. 134 00:06:13,930 --> 00:06:16,240 ‫Okay, so next then now that 135 00:06:16,240 --> 00:06:18,050 ‫the serverless application repository can access 136 00:06:18,050 --> 00:06:21,010 ‫our S3 buckets we need to package the application. 137 00:06:21,010 --> 00:06:23,370 ‫So let's just package our application 138 00:06:23,370 --> 00:06:25,110 ‫so we're going to copy this command 139 00:06:25,110 --> 00:06:26,230 ‫to package our application 140 00:06:26,230 --> 00:06:30,020 ‫and we specify again the name of the S3 buckets at the end. 141 00:06:30,020 --> 00:06:33,320 ‫And this is going to create a package.yaml file. 142 00:06:33,320 --> 00:06:36,540 ‫And this package.yaml as we know is what is going to be 143 00:06:36,540 --> 00:06:39,830 ‫a transformed CloudFormation template okay? 144 00:06:39,830 --> 00:06:41,740 ‫So as we can see, we can deploy the function 145 00:06:41,740 --> 00:06:43,430 ‫as we've done from before using this command 146 00:06:43,430 --> 00:06:44,270 ‫but we don't wanna do so. 147 00:06:44,270 --> 00:06:46,400 ‫We wanna publish now this application 148 00:06:46,400 --> 00:06:49,010 ‫into our serverless application repository. 149 00:06:49,010 --> 00:06:52,580 ‫So to do so we're going to run the sam-publish commands. 150 00:06:52,580 --> 00:06:55,190 ‫So we're gonna just run the sam-publish command right here 151 00:06:55,190 --> 00:06:57,930 ‫paste it and make sure you change the region 152 00:06:57,930 --> 00:07:00,100 ‫if you are not in US East one. 153 00:07:00,100 --> 00:07:03,120 ‫And so this is saying that this does not have 154 00:07:03,120 --> 00:07:05,193 ‫access to the buckets so one second. 155 00:07:06,130 --> 00:07:07,620 ‫And so the instructions are here 156 00:07:07,620 --> 00:07:09,680 ‫and I know already what is wrong 157 00:07:09,680 --> 00:07:12,870 ‫so I look at the instructions I scroll down and here 158 00:07:12,870 --> 00:07:14,020 ‫I need you edit the S3 bucket name 159 00:07:14,020 --> 00:07:16,450 ‫but also the source accounts for the S3 buckets 160 00:07:16,450 --> 00:07:21,070 ‫so my policy is not perfect so I'm can just go and edit it. 161 00:07:21,070 --> 00:07:25,380 ‫So I'll do again the nano policy.json and here 162 00:07:25,380 --> 00:07:27,397 ‫the AWS source account has to be changed 163 00:07:27,397 --> 00:07:31,320 ‫and I need to edit this and insert my account number 164 00:07:31,320 --> 00:07:32,550 ‫which is right here. 165 00:07:32,550 --> 00:07:35,900 ‫So I'm going to copy this account number, paste it here, 166 00:07:35,900 --> 00:07:38,220 ‫exit and save. 167 00:07:38,220 --> 00:07:41,860 ‫Yes and then I'm going to apply the policy again 168 00:07:41,860 --> 00:07:43,983 ‫so using the S3 API command. 169 00:07:45,630 --> 00:07:47,320 ‫It's been applied. Clear. 170 00:07:47,320 --> 00:07:50,720 ‫And so now if I rerun the publish command 171 00:07:50,720 --> 00:07:52,770 ‫it should work because I have a correct, 172 00:07:52,770 --> 00:07:54,160 ‫yes, S3 bucket policy. 173 00:07:54,160 --> 00:07:55,160 ‫Perfect. 174 00:07:55,160 --> 00:07:58,130 ‫So as we can see, we can now click on this link 175 00:07:58,130 --> 00:08:01,010 ‫to view the application in the console. 176 00:08:01,010 --> 00:08:03,160 ‫So if I open this link right here 177 00:08:03,160 --> 00:08:05,210 ‫within our published applications 178 00:08:05,210 --> 00:08:07,340 ‫and I'm going to close this, we have my app 179 00:08:07,340 --> 00:08:08,583 ‫so let me show you. 180 00:08:09,830 --> 00:08:12,030 ‫Under my application we have my app 181 00:08:12,030 --> 00:08:15,400 ‫and under available application it's also referenced under 182 00:08:15,400 --> 00:08:18,300 ‫private applications so very cool. 183 00:08:18,300 --> 00:08:20,580 ‫Now we could go ahead and deploy this application 184 00:08:20,580 --> 00:08:24,510 ‫so I click on it and I can sorry 185 00:08:24,510 --> 00:08:26,610 ‫go into available applications, private applications 186 00:08:26,610 --> 00:08:29,115 ‫here it is and here we're going to publish it. 187 00:08:29,115 --> 00:08:31,440 ‫So it is perfect. 188 00:08:31,440 --> 00:08:33,470 ‫We can look at the read me file we have none. 189 00:08:33,470 --> 00:08:36,200 ‫The application is my-app, and then we're going to enter 190 00:08:36,200 --> 00:08:38,930 ‫custom name Stephane to greet myself. 191 00:08:38,930 --> 00:08:39,930 ‫So I'll deploy this. 192 00:08:44,570 --> 00:08:48,760 ‫And I forgot to obviously update the application code 193 00:08:50,230 --> 00:08:52,320 ‫which is a cool mistake to do, because I can show you 194 00:08:52,320 --> 00:08:54,680 ‫how to update your serverless repo app. 195 00:08:54,680 --> 00:08:58,030 ‫So anyway first if we look at the end points and we go to it 196 00:08:58,030 --> 00:09:01,580 ‫and we do slash hello, we're going to get 197 00:09:01,580 --> 00:09:03,010 ‫message hello world so that means that 198 00:09:03,010 --> 00:09:05,820 ‫our serverless application has been deployed 199 00:09:05,820 --> 00:09:06,660 ‫and it says hello world 200 00:09:06,660 --> 00:09:09,080 ‫but we want it to say hello world Stephane. 201 00:09:09,080 --> 00:09:11,290 ‫So to do so we need to just go ahead 202 00:09:11,290 --> 00:09:12,590 ‫and update it for the code 203 00:09:12,590 --> 00:09:15,470 ‫so let's go back into CloudShell 204 00:09:15,470 --> 00:09:18,250 ‫which is somewhere around here, there we go. 205 00:09:18,250 --> 00:09:20,930 ‫And within my app so in the hello world, 206 00:09:20,930 --> 00:09:25,770 ‫there is an app.py and I need to just edit app.py. 207 00:09:25,770 --> 00:09:28,290 ‫I'm going to just delete this file entirely. 208 00:09:28,290 --> 00:09:31,070 ‫I'm going to remove app.py to make it simple, 209 00:09:31,070 --> 00:09:36,070 ‫touch app.py to create it and nano app.py to edit it 210 00:09:37,220 --> 00:09:39,130 ‫and I'm just going to take the application 211 00:09:39,130 --> 00:09:42,640 ‫from hello world in here, copy this entirely, paste it 212 00:09:42,640 --> 00:09:44,280 ‫and paste it. 213 00:09:44,280 --> 00:09:47,010 ‫So this is, it's very simple lambda function 214 00:09:47,010 --> 00:09:50,040 ‫which takes some inputs and says, hello world 215 00:09:50,040 --> 00:09:53,220 ‫plus the environ variable custom name. 216 00:09:53,220 --> 00:09:55,260 ‫It will say hello world Stephane. 217 00:09:55,260 --> 00:09:57,330 ‫So that's perfect. It's been packaged. 218 00:09:57,330 --> 00:09:59,370 ‫Now I need to go one level up. 219 00:09:59,370 --> 00:10:03,510 ‫I will go into my template.yaml file 220 00:10:03,510 --> 00:10:06,980 ‫so I'm going to edit my template.yaml file. 221 00:10:06,980 --> 00:10:08,970 ‫And this time I'm going to update my application 222 00:10:08,970 --> 00:10:12,423 ‫and the semantic version is going to be 0.0.2. 223 00:10:13,320 --> 00:10:14,350 ‫Great. 224 00:10:14,350 --> 00:10:16,520 ‫Now we have to run the same command to package 225 00:10:16,520 --> 00:10:19,210 ‫our application so let's take it from here. 226 00:10:19,210 --> 00:10:22,160 ‫We're going to package the SAM package. 227 00:10:22,160 --> 00:10:23,790 ‫Let's try to find it in here 228 00:10:23,790 --> 00:10:24,830 ‫'cause we have the right bucket name. 229 00:10:24,830 --> 00:10:29,230 ‫So SAM package, here we go, and we get a new packaged file 230 00:10:29,230 --> 00:10:33,763 ‫and then a SAM publish command to publish our new version. 231 00:10:35,760 --> 00:10:38,490 ‫Okay, excellent so now the version 0.0.2 has been published 232 00:10:38,490 --> 00:10:42,303 ‫so let's go back into our serverless application repository. 233 00:10:43,190 --> 00:10:45,890 ‫I can go into my available applications 234 00:10:45,890 --> 00:10:47,640 ‫which are right here. 235 00:10:47,640 --> 00:10:52,310 ‫This one, my app, my app is now on version 236 00:10:52,310 --> 00:10:56,470 ‫so if we look at it, a 0.0.2 it's going to show 237 00:10:56,470 --> 00:11:00,680 ‫somewhere around here so if, version 0.0.2 here we go. 238 00:11:00,680 --> 00:11:03,530 ‫And I can just redeploy it so I'm going to deploy it 239 00:11:03,530 --> 00:11:07,350 ‫and this time I will say, Stephane deploy 240 00:11:09,630 --> 00:11:12,230 ‫and the deployment has now started. 241 00:11:12,230 --> 00:11:14,910 ‫So there is a new deployment, and this is an update 242 00:11:14,910 --> 00:11:16,930 ‫because we are using the same app name 243 00:11:16,930 --> 00:11:18,580 ‫and so it's using the same CloudFormation stack 244 00:11:18,580 --> 00:11:20,640 ‫so if we go into CloudFormation 245 00:11:20,640 --> 00:11:22,670 ‫now we are in update in progress 246 00:11:22,670 --> 00:11:25,120 ‫so we are updating our application. 247 00:11:25,120 --> 00:11:27,460 ‫And when the Lambda function has been deployed 248 00:11:27,460 --> 00:11:29,060 ‫when we go to this URL, it should say, 249 00:11:29,060 --> 00:11:30,310 ‫hello world Stephane. 250 00:11:30,310 --> 00:11:32,480 ‫So let's wait a little bit. 251 00:11:32,480 --> 00:11:36,600 ‫So my application is now updated and if I refresh I get 252 00:11:36,600 --> 00:11:39,910 ‫hello world Stephane so everything is working as expected 253 00:11:39,910 --> 00:11:41,940 ‫and this is amazing and I've been showing you as well 254 00:11:41,940 --> 00:11:46,650 ‫how to update a serverless application repository in SAR. 255 00:11:46,650 --> 00:11:49,530 ‫So to clean up this hands-on fairly easy 256 00:11:49,530 --> 00:11:52,500 ‫we just need to do it a few CloudFormation templates 257 00:11:52,500 --> 00:11:54,970 ‫and include some applications so to do so, 258 00:11:54,970 --> 00:11:57,700 ‫let's go into the Lambda console right here 259 00:11:57,700 --> 00:12:01,380 ‫and I'm going to go into the functions first of all 260 00:12:01,380 --> 00:12:04,410 ‫so it is going to the Lambda console here 261 00:12:06,750 --> 00:12:08,870 ‫and we're going to get our applications 262 00:12:08,870 --> 00:12:11,470 ‫and the two applications the hello world application 263 00:12:12,974 --> 00:12:14,910 ‫we need to go to the application stack 264 00:12:14,910 --> 00:12:18,713 ‫so let's go through the shortcut here. 265 00:12:20,630 --> 00:12:22,250 ‫So we're gonna go into CloudFormation. 266 00:12:22,250 --> 00:12:24,740 ‫We're going to delete this one 267 00:12:24,740 --> 00:12:26,610 ‫and we're going to delete that one as well 268 00:12:26,610 --> 00:12:28,570 ‫so both are going to be deleted directly 269 00:12:28,570 --> 00:12:29,583 ‫from CloudFormation. 270 00:12:30,920 --> 00:12:31,753 ‫CloudFormation is done 271 00:12:31,753 --> 00:12:33,710 ‫so I can go into serverless application 272 00:12:33,710 --> 00:12:38,110 ‫I can look at this application and I can delete it entirely 273 00:12:38,110 --> 00:12:42,100 ‫so to do so I'm gonna go into the published application 274 00:12:42,100 --> 00:12:46,070 ‫on the left hand side, click on this one, my app, 275 00:12:46,070 --> 00:12:47,270 ‫and then delete application 276 00:12:47,270 --> 00:12:49,430 ‫to delete the serverless application. 277 00:12:49,430 --> 00:12:52,480 ‫And finally, if you wanted to do a perfect cleanup 278 00:12:52,480 --> 00:12:54,130 ‫you would go into Amazon S3 279 00:12:54,130 --> 00:12:57,000 ‫we would delete everything that we don't need. 280 00:12:57,000 --> 00:13:00,320 ‫So we go into Amazon S3, we look at SAR, 281 00:13:00,320 --> 00:13:01,260 ‫here's my buckets. 282 00:13:01,260 --> 00:13:03,500 ‫As we can see, we have two deployment packages 283 00:13:03,500 --> 00:13:06,500 ‫so I can just delete this deployment packages 284 00:13:06,500 --> 00:13:10,800 ‫from my bucket so I'll type permanently delete in here 285 00:13:10,800 --> 00:13:13,640 ‫and then finally you could delete the bucket itself 286 00:13:13,640 --> 00:13:18,640 ‫so you go to the buckets in here and delete 287 00:13:18,960 --> 00:13:21,480 ‫and then I type its name, and I'm good to go. 288 00:13:21,480 --> 00:13:22,950 ‫So that's it for this demo on SAR. 289 00:13:22,950 --> 00:13:24,810 ‫We've seen how to deploy a public application 290 00:13:24,810 --> 00:13:27,620 ‫but also how to package and publish our own applications 291 00:13:27,620 --> 00:13:30,450 ‫and update them from the console. 292 00:13:30,450 --> 00:13:31,300 ‫So I hope you like this 293 00:13:31,300 --> 00:13:33,250 ‫and I will see you in the next lecture.