1 00:00:00,080 --> 00:00:03,590 ‫So let's talk about some few additional points about Codepipeline. 2 00:00:03,620 --> 00:00:09,730 ‫The first one is that you have the concept to start with a pipeline of events, webhooks and polling. 3 00:00:09,800 --> 00:00:14,340 ‫So let's have a look at all of them and see which one is best in which situation. 4 00:00:14,360 --> 00:00:19,880 ‫So events is going to be the preferred way in Codepipeline, and this is to start a pipeline whenever 5 00:00:19,880 --> 00:00:20,810 ‫we have an event. 6 00:00:20,810 --> 00:00:26,240 ‫So for example, when we have code commit, for example, we know that on a new commit an event will 7 00:00:26,240 --> 00:00:32,780 ‫happen in Eventbridge and the eventbridge rule associated with that event can trigger and start a code 8 00:00:32,780 --> 00:00:33,470 ‫pipeline. 9 00:00:33,500 --> 00:00:40,430 ‫This is the preferred way and it's not only code commit, but could be any kind of events within AWS 10 00:00:40,730 --> 00:00:43,670 ‫with GitHub, which is not part of AWS. 11 00:00:43,700 --> 00:00:47,000 ‫How do you have event driven starting of Codepipeline? 12 00:00:47,030 --> 00:00:51,170 ‫Well, to do so, you're going to use let's call the Codestar source connection. 13 00:00:51,170 --> 00:00:56,870 ‫It's just a fancy name for a GitHub application that is going to connect GitHub into AWS. 14 00:00:56,870 --> 00:01:00,000 ‫And then from this you're going to trigger Codepipeline. 15 00:01:00,000 --> 00:01:06,240 ‫So these things are event driven and they are very fast because as soon as the event happens, Codepipeline 16 00:01:06,240 --> 00:01:07,800 ‫is going to be triggered. 17 00:01:08,220 --> 00:01:15,150 ‫An older way of triggering codepipeline is using webhook, so if you choose that option, then Codepipeline 18 00:01:15,150 --> 00:01:21,270 ‫is going to expose an HTTP endpoint and that endpoint can be triggered by a script, whatever you want. 19 00:01:21,300 --> 00:01:28,110 ‫If that script sends a payload to codepipeline on that webhook, then Codepipeline is going to start. 20 00:01:28,110 --> 00:01:34,590 ‫And finally you can have codepipeline pull the source, in which case you have regular checks, for 21 00:01:34,590 --> 00:01:36,660 ‫example, from Codepipeline onto GitHub. 22 00:01:36,660 --> 00:01:41,190 ‫But that is not recommended because it's not as efficient as events. 23 00:01:41,190 --> 00:01:45,960 ‫So events are the default and recommended way to start a codepipeline. 24 00:01:46,050 --> 00:01:50,460 ‫Next we have this table on codepipeline that you don't have to learn. 25 00:01:50,460 --> 00:01:54,480 ‫I'm going to just help you decrypt it and help you understand what it means. 26 00:01:54,480 --> 00:02:00,720 ‫So we have owner action type provider and then a valid number of input artifacts and output artifacts. 27 00:02:00,750 --> 00:02:05,610 ‫The last two columns we don't need to look at, we're going to look at the first three so the owner 28 00:02:05,610 --> 00:02:06,420 ‫can be either. 29 00:02:07,290 --> 00:02:11,340 ‫And that means that it's an action related to an AWS service. 30 00:02:11,370 --> 00:02:13,200 ‫It could be a third party. 31 00:02:13,200 --> 00:02:20,130 ‫That's when an action is related to a third party such as GitHub or Alexa skills kit or custom. 32 00:02:20,130 --> 00:02:22,740 ‫And this is once you have something like Jenkins. 33 00:02:22,740 --> 00:02:30,030 ‫So remember for AWS and third party and custom, now the action type corresponds to different stages 34 00:02:30,030 --> 00:02:30,990 ‫of your pipeline. 35 00:02:31,020 --> 00:02:35,850 ‫For example, you have the source for S3, ECR, GitHub code Commit. 36 00:02:35,880 --> 00:02:39,030 ‫We have the build for Codebuild and Jenkins. 37 00:02:39,030 --> 00:02:42,870 ‫We have the tests for Codebuild Device Farm and Jenkins. 38 00:02:42,870 --> 00:02:46,170 ‫We have approval and the action type is called manual. 39 00:02:46,170 --> 00:02:47,700 ‫We'll see this in the next slide as well. 40 00:02:47,700 --> 00:02:48,570 ‫That's important. 41 00:02:48,600 --> 00:02:54,960 ‫Invoke for lambda and step functions and deploy for S3 CloudFormation Code, Deploy Elastic Beanstalk 42 00:02:54,990 --> 00:02:57,200 ‫Opsworks and service catalog. 43 00:02:57,210 --> 00:03:01,440 ‫Now, don't worry if you don't know some of these services, you will see them in the course and of 44 00:03:01,440 --> 00:03:06,470 ‫course you will very easily understand if they are of type, source, build, test and so on. 45 00:03:06,480 --> 00:03:08,210 ‫So why do I show you this? 46 00:03:08,220 --> 00:03:14,010 ‫Well, because the approval type of manual is part of an exam question that can come up. 47 00:03:14,010 --> 00:03:17,580 ‫So let's go over the details of how manual approval works. 48 00:03:17,790 --> 00:03:23,370 ‫So when you have a code pipeline and you have a manual approval, the important part is that the owner 49 00:03:23,370 --> 00:03:32,070 ‫is AWS because this is related to within AWS, it's a capability offered by an AWS service and the action 50 00:03:32,070 --> 00:03:37,800 ‫is going to be manual because this is a manual approval, in which case when you have a manual approval, 51 00:03:37,800 --> 00:03:43,980 ‫what's going to happen is that you can trigger an SNS topic which is in turn can send an email to a 52 00:03:43,980 --> 00:03:47,790 ‫user and the user will have an IAM user on AWS. 53 00:03:47,790 --> 00:03:54,450 ‫And then you will have to approve this stage and to approve this stage it needs permissions and the 54 00:03:54,450 --> 00:03:57,840 ‫permissions the user must have are twofold. 55 00:03:57,870 --> 00:04:03,780 ‫Number one is get pipeline because while the user must be able to get to your pipeline to actually view 56 00:04:03,780 --> 00:04:06,540 ‫it and to find that manual approval step. 57 00:04:06,540 --> 00:04:14,550 ‫So we want the get pipeline star type of action and then we want the put approval result action on the 58 00:04:14,550 --> 00:04:19,350 ‫approval action itself because we want to be able to say yes or no, we approve or we deny. 59 00:04:19,380 --> 00:04:21,030 ‫So that's all you need to know. 60 00:04:21,030 --> 00:04:26,220 ‫But it's important to understand the IAM user permissions as well as the fact that the step owner is 61 00:04:26,580 --> 00:04:29,490 ‫AWS and the action of the step is manual. 62 00:04:29,640 --> 00:04:30,120 ‫All right. 63 00:04:30,120 --> 00:04:30,990 ‫That's it for this lecture. 64 00:04:30,990 --> 00:04:33,990 ‫I hope you liked it and I will see you in the next lecture.