1 00:00:07,040 --> 00:00:10,010 - Welcome. In this demonstration, 2 00:00:10,010 --> 00:00:13,390 we are gonna take a look at the code commit service 3 00:00:13,390 --> 00:00:17,980 and create a code repository within that service. 4 00:00:17,980 --> 00:00:20,690 Here we are in the AWS console home. 5 00:00:20,690 --> 00:00:23,810 And if I search, I can just type the word code 6 00:00:23,810 --> 00:00:25,700 and you'll see that there are a number of services 7 00:00:25,700 --> 00:00:28,870 that come up automatically code commit, code pipeline, 8 00:00:28,870 --> 00:00:30,330 we have this AWS signer, 9 00:00:30,330 --> 00:00:32,310 we've got CodeDeploy. 10 00:00:32,310 --> 00:00:34,960 The code build is in there somewhere too 11 00:00:35,890 --> 00:00:37,920 but we want code commit. 12 00:00:37,920 --> 00:00:39,143 So we'll start there. 13 00:00:41,310 --> 00:00:44,630 When we create our repos, they are region scoped 14 00:00:44,630 --> 00:00:48,030 but we can access those from any region. 15 00:00:48,030 --> 00:00:50,110 It's just a matter of convenience 16 00:00:50,110 --> 00:00:51,740 to have them in the same region, 17 00:00:51,740 --> 00:00:55,160 that's one way of avoiding cross region traffic charges, 18 00:00:55,160 --> 00:00:57,710 if you're performing a lot of pushes 19 00:00:57,710 --> 00:01:00,970 or polls against that repo. 20 00:01:00,970 --> 00:01:02,930 So I have no repos in here at the moment. 21 00:01:02,930 --> 00:01:07,460 You can see that there's a number of different areas here 22 00:01:07,460 --> 00:01:10,810 and it's recommends different services. 23 00:01:10,810 --> 00:01:13,380 Artifacts, code artifact, build, code build, 24 00:01:13,380 --> 00:01:16,020 deploy, CodeDeploy, pipelines. 25 00:01:16,020 --> 00:01:18,580 And so we could actually look at these, 26 00:01:18,580 --> 00:01:20,370 all within this same dashboard 27 00:01:20,370 --> 00:01:24,293 as well as a number of settings around notifications. 28 00:01:25,150 --> 00:01:26,850 So let's start here 29 00:01:26,850 --> 00:01:30,020 with the bright orange button, create the repository. 30 00:01:30,020 --> 00:01:32,780 You see that this is not a wizard. 31 00:01:32,780 --> 00:01:37,383 There's no multiple pages of information required. 32 00:01:38,430 --> 00:01:40,880 This is easy test repo 33 00:01:40,880 --> 00:01:44,113 and we can give it a test description as well. 34 00:01:45,660 --> 00:01:48,210 We can add a tag to it, cost center 35 00:01:52,210 --> 00:01:55,840 and then we can go and click create. 36 00:01:55,840 --> 00:02:00,523 And realistically that's all we need to create a repo. 37 00:02:01,420 --> 00:02:05,020 Connecting to it is another set of tasks. 38 00:02:05,020 --> 00:02:09,340 And AWS is going to give you some of those recommendations 39 00:02:09,340 --> 00:02:11,973 right here under connection steps. 40 00:02:12,890 --> 00:02:16,040 So it tells us right away 41 00:02:16,040 --> 00:02:19,810 we are going to have a difficult time using HTTPS 42 00:02:19,810 --> 00:02:22,870 because we're signed in using Federation. 43 00:02:22,870 --> 00:02:25,070 We have temporary credentials. 44 00:02:25,070 --> 00:02:29,243 The only way to use these is with the AWS CLI. 45 00:02:30,220 --> 00:02:33,460 And we can use the credential helper on the CLI 46 00:02:33,460 --> 00:02:35,793 as one way of connecting. 47 00:02:38,420 --> 00:02:42,770 Otherwise we can create credentials 48 00:02:42,770 --> 00:02:46,300 within an IAM user that would be able to connect to this. 49 00:02:46,300 --> 00:02:50,370 Notice SSH is entirely grayed out 50 00:02:50,370 --> 00:02:53,020 because that is not possible 51 00:02:53,020 --> 00:02:55,293 when using the temporary credentials either. 52 00:02:56,380 --> 00:03:01,380 If we wanted to create static credentials to use this repo, 53 00:03:02,100 --> 00:03:04,623 we would then go to the IAM service, 54 00:03:06,790 --> 00:03:08,780 we're gonna look at the IAM user 55 00:03:08,780 --> 00:03:10,733 we've created called live lessons. 56 00:03:12,960 --> 00:03:15,370 There are a number of different credential types 57 00:03:15,370 --> 00:03:18,290 that can be applied to an IAM user. 58 00:03:18,290 --> 00:03:22,800 We have the username and password for the console. 59 00:03:22,800 --> 00:03:27,740 We have MFA and we have access keys for programmatic access 60 00:03:27,740 --> 00:03:29,620 but take a look right here. 61 00:03:29,620 --> 00:03:32,040 SSH keys for code commit, now, 62 00:03:32,040 --> 00:03:34,440 it doesn't allow you to generate one, 63 00:03:34,440 --> 00:03:37,500 it only allows you to upload one. 64 00:03:37,500 --> 00:03:39,250 So you would have to upload 65 00:03:39,250 --> 00:03:44,250 the public key of that key pair into the IAM dashboard, 66 00:03:46,260 --> 00:03:48,860 if you wanted to use SSH. 67 00:03:48,860 --> 00:03:53,750 You can also generate HTTPS credentials directly 68 00:03:53,750 --> 00:03:55,340 for an IAM user. 69 00:03:55,340 --> 00:03:59,560 And this gives you a one time opportunity to download those. 70 00:03:59,560 --> 00:04:01,740 And you can see it creates a username. 71 00:04:01,740 --> 00:04:03,170 There's a password. 72 00:04:03,170 --> 00:04:05,830 We can download the CSV file 73 00:04:05,830 --> 00:04:08,460 and then we can configure our local get client 74 00:04:08,460 --> 00:04:10,003 to use those instead. 75 00:04:12,030 --> 00:04:13,970 Let's go back to code commit. 76 00:04:13,970 --> 00:04:15,720 Now there's also a mechanism 77 00:04:15,720 --> 00:04:20,620 for using HTTPS with GRC, the get remote code commit 78 00:04:20,620 --> 00:04:22,370 and that would be another way, 79 00:04:22,370 --> 00:04:26,210 potentially of connecting to our repo. 80 00:04:26,210 --> 00:04:28,960 And it's nice because AWS actually gives you 81 00:04:28,960 --> 00:04:33,760 all of the steps required to make this happen. 82 00:04:33,760 --> 00:04:36,710 And so if we go back to our repository 83 00:04:36,710 --> 00:04:38,603 outside of all the instructions, 84 00:04:39,598 --> 00:04:42,270 we can now look and see on the left hand side, 85 00:04:42,270 --> 00:04:45,800 we've got poll requests, commits, branches, tags, 86 00:04:45,800 --> 00:04:48,700 and settings, so that we can modify 87 00:04:48,700 --> 00:04:53,070 these on a per repository basis. 88 00:04:53,070 --> 00:04:55,093 And that completes this demonstration.