‫So let's talk about some few additional points about Codepipeline.
‫The first one is that you have the concept to start with a pipeline of events, webhooks and polling.
‫So let's have a look at all of them and see which one is best in which situation.
‫So events is going to be the preferred way in Codepipeline, and this is to start a pipeline whenever
‫we have an event.
‫So for example, when we have code commit, for example, we know that on a new commit an event will
‫happen in Eventbridge and the eventbridge rule associated with that event can trigger and start a code
‫pipeline.
‫This is the preferred way and it's not only code commit, but could be any kind of events within AWS
‫with GitHub, which is not part of AWS.
‫How do you have event driven starting of Codepipeline?
‫Well, to do so, you're going to use let's call the Codestar source connection.
‫It's just a fancy name for a GitHub application that is going to connect GitHub into AWS.
‫And then from this you're going to trigger Codepipeline.
‫So these things are event driven and they are very fast because as soon as the event happens, Codepipeline
‫is going to be triggered.
‫An older way of triggering codepipeline is using webhook, so if you choose that option, then Codepipeline
‫is going to expose an HTTP endpoint and that endpoint can be triggered by a script, whatever you want.
‫If that script sends a payload to codepipeline on that webhook, then Codepipeline is going to start.
‫And finally you can have codepipeline pull the source, in which case you have regular checks, for
‫example, from Codepipeline onto GitHub.
‫But that is not recommended because it's not as efficient as events.
‫So events are the default and recommended way to start a codepipeline.
‫Next we have this table on codepipeline that you don't have to learn.
‫I'm going to just help you decrypt it and help you understand what it means.
‫So we have owner action type provider and then a valid number of input artifacts and output artifacts.
‫The last two columns we don't need to look at, we're going to look at the first three so the owner
‫can be either.
‫And that means that it's an action related to an AWS service.
‫It could be a third party.
‫That's when an action is related to a third party such as GitHub or Alexa skills kit or custom.
‫And this is once you have something like Jenkins.
‫So remember for AWS and third party and custom, now the action type corresponds to different stages
‫of your pipeline.
‫For example, you have the source for S3, ECR, GitHub code Commit.
‫We have the build for Codebuild and Jenkins.
‫We have the tests for Codebuild Device Farm and Jenkins.
‫We have approval and the action type is called manual.
‫We'll see this in the next slide as well.
‫That's important.
‫Invoke for lambda and step functions and deploy for S3 CloudFormation Code, Deploy Elastic Beanstalk
‫Opsworks and service catalog.
‫Now, don't worry if you don't know some of these services, you will see them in the course and of
‫course you will very easily understand if they are of type, source, build, test and so on.
‫So why do I show you this?
‫Well, because the approval type of manual is part of an exam question that can come up.
‫So let's go over the details of how manual approval works.
‫So when you have a code pipeline and you have a manual approval, the important part is that the owner
‫is AWS because this is related to within AWS, it's a capability offered by an AWS service and the action
‫is going to be manual because this is a manual approval, in which case when you have a manual approval,
‫what's going to happen is that you can trigger an SNS topic which is in turn can send an email to a
‫user and the user will have an IAM user on AWS.
‫And then you will have to approve this stage and to approve this stage it needs permissions and the
‫permissions the user must have are twofold.
‫Number one is get pipeline because while the user must be able to get to your pipeline to actually view
‫it and to find that manual approval step.
‫So we want the get pipeline star type of action and then we want the put approval result action on the
‫approval action itself because we want to be able to say yes or no, we approve or we deny.
‫So that's all you need to know.
‫But it's important to understand the IAM user permissions as well as the fact that the step owner is
‫AWS and the action of the step is manual.
‫All right.
‫That's it for this lecture.
‫I hope you liked it and I will see you in the next lecture.