‫Okay, so let's have a look at the different code services.
‫So let's start with CodeCommit.
‫I'm going to go in here.
‫As we can see, we have CodeCommit.
‫We have CodeArtifacts, CodeBuild, CodeDeploy,
‫and CodePipeline available from the left hand side
‫as standalone tools.
‫So we could go ahead and use all of them one by one,
‫but that would be very complicated.
‫But as you can see here, for example, for CodeCommits,
‫you have zero repository,
‫but you can create a new code repository very quickly
‫by clicking on this code, and get started.
‫But for now, what I want to show you
‫is how we can get started with all of them at once,
‫using only one service.
‫And that service is CodeStar.
‫So if we go to CodeStar, we can see now there's
‫only one left hand side tool on the bar.
‫And so I'm going to create a project and get started
‫with creating a service role for good start to work.
‫So this is working, great.
‫And then we're going to create an application
‫that is going to run on Elastic Beanstalk.
‫And maybe we'll use Python.
‫So here we have Python (Flask), which is a web service
‫running on AWS Elastic Beanstalk.
‫Just for an example, right.
‫I'll click on Next.
‫And here we are going to call this "DemoProject."
‫The repo is going to be CodeCommit,
‫so it's going to create a code repository for us.
‫The instances are going to be to be t2micro.
‫And we don't...
‫We're just going to create a key pair for us to get started.
‫So let's go into EC2.
‫And I'm just going to create a dummy key pair
‫for this hands-on, in case you don't have one.
‫So I work with multiple accounts,
‫so sometimes I don't have all the key pairs
‫in all the accounts.
‫So here we go.
‫Key pair is created, and if I refresh,
‫I can select this dummy key pair.
‫Great.
‫I click on next and then create the projects.
‫And so CodeStar is going to set up the project resources,
‫and that may take a few minutes, and so what I'm going to do
‫is pause the video until all of this is done
‫to show you the results.
‫So let me refresh this page.
‫It's been a while now.
‫And my CodeStar Project has been set up.
‫So let's have a look at what has happened.
‫So as we can see, there was a pipeline that has been created
‫and has been executed.
‫If we look at the project resources,
‫a lot has been created for us.
‫So an Elastic Beanstalk application has been created.
‫A CodePipeline, a CodeCommit repository,
‫a CodeBuild project, and CloudFormation stack.
‫So a lot of things have been created for us.
‫So let's explore all these things one by one.
‫So if we go to CodePipeline,
‫we can see on the left hand side, it's CodePipeline.
‫So we saw that there was a source,
‫which had the application code in CodeCommit
‫that was pulled.
‫Then it was sent to CodeBuild to build the project,
‫which succeeded.
‫And then it was being deployed by CloudFormation
‫into Elastic Beanstalk.
‫Okay, so all of this was orchestrated by CodePipeline.
‫So as you can see, CodeDeploy is not being used
‫in this project.
‫CodeBuild is being used.
‫So we can see the fact that yes,
‫a demo project was created here.
‫CodeArtifact is not being used and CodeCommit is being used.
‫And if you go into CodeCommit, as we can see,
‫in the project we see directories and files,
‫which represents the code repository itself.
‫So it really shows you a bunch of the Code Developer Tools
‫associated with CodeStar in this lecture.
‫But more importantly, if we go to Beanstalk,
‫and in Beanstalk we can see the application.
‫If I click on this URL right here,
‫it takes me into the project itself,
‫which has been deployed on Beanstalk.
‫And it says, "Output. Hello World,"
‫which shows that the application is working.
‫Not very impressive, but still, it was being set up.
‫And now we're ready to work.
‫So finally, the last thing I want to show you is Cloud9.
‫So if I set up Cloud9, this is going to give me an IDE.
‫So if I go to IDE here, we can access the environment
‫either using Cloud9 or CodeCommits,
‫or some tools that we can use locally,
‫such as the command line interface,
‫Visual Studio, and so on.
‫But let's create Cloud9,
‫because I want to use a Cloud9 environment.
‫So I'm going to create a Cloud9 environment
‫of type t2 micro.
‫And this is an environment, so I'll call it "DemoEnv."
‫And for cost-saving settings,
‫after 30 minutes of inactivity,
‫let's shut down the instance.
‫And this is going to create for me my cloud IDE.
‫So let's wait a little bit until this is created.
‫And actually, while this is creating,
‫so let me just refresh this page.
‫So while this is being created,
‫and I'll just wait a little bit,
‫we can see that from within the CodeStar UI,
‫we can see the repo details,
‫as well as some information around CodeCommits.
‫We can see the pipeline itself,
‫so we don't need to go directly into CodePipeline to see it.
‫We can also see it in this UI, which is quite neat.
‫We have some information around monitoring,
‫which is going to give us some settings
‫around the Amazon EC2 metrics and so on.
‫And issues, if we wanted to integrate
‫with an external issue tracking system
‫such as Jira.
‫But let's go back to our IDE
‫and wait for our Cloud9 environment to be provisioned.
‫And for this,
‫if you go into the CloudFormation service right here,
‫we will be able to see the fact that it is
‫in "create in progress" state.
‫So let's wait a little bit.
‫So my CloudFormation stack is now created,
‫so my Cloud9 environment is ready.
‫And I refresh this page to access this.
‫And so if I click on "Open IDE,"
‫I'm going to get directly into the Cloud9.
‫And as we can see, this is a web browser.
‫So everything is running from the web browser,
‫but this allows you to just run your code
‫and edit your code directly from within the web browser,
‫which is really cool.
‫You get a command line interface as well
‫from within the web browser to talk to your code
‫if you wanted to or run some commands, which is awesome.
‫And you can literally edit your code from
‫within a web browser.
‫And if someone else were to connect to this
‫at the same time as me,
‫we could edit the code together at the same time.
‫So this is quite neat, because I can run this web browser
‫from any IDE.
‫from any web browser
‫from anyone's work laptop.
‫And so that means that I can be efficient,
‫and I don't need to set up anything on my computer.
‫And so if we, for example,
‫were to look at some configuration.
‫So this 'helloworld' thing, and there's this
‫like an application, that py file.
‫We can see, for example, here, the method is 'GET',
‫and the output was "Hello World."
‫And so I say, "Hello World Stephane."
‫And I'm just going to change this, right,
‫so I'm going to save this file.
‫So now it's saved.
‫And now I just need to commit this file into gits.
‫So in the left hand sides have gits,
‫so I can apply this change right here.
‫So this is working.
‫And then I can just say, "edit welcome message."
‫Okay, and then click on this, sorry,
‫enter or Control + Enter maybe, to be done.
‫So now the file has been committed.
‫And the only thing I need to do now is git push.
‫So if I do, and where is it?
‫So I need to go to "my project".
‫So demo project, and I do git push.
‫This is going to push the code directly into my code commit.
‫So if I go back in here,
‫into CodeStar and go to repository,
‫there was a commit that was done right now called,
‫"edit welcome message."
‫And this commit that was being done
‫is going to trigger my pipeline.
‫And the whole thing is going to happen just again.
‫So, as we can see, the source was just succeeded right now.
‫Now we are in the CodeBuild phase,
‫so the code is being built again.
‫And then it will be deployed.
‫So let me wait a little bit to show you the effect of this.
‫But as you can see right now, if I refresh,
‫it just says "Output. Hello World."
‫And at the end of the pipeline,
‫we should see something else.
‫And so it turns out that my CodeBuild has failed.
‫And this is cool,
‫because it didn't deploy a code that failed a test.
‫So if you look at the details of why it has failed,
‫and I click on this link.
‫If I have a look and look at the build log all the way down,
‫we can see that it was running a test and a test did fail.
‫And it was looking at whether "Hello World Stephane,"
‫which is a new thing I changed, was equal to "Hello World."
‫And it wasn't the case, so it failed.
‫So let's go ahead and fix that.
‫So again, we can go into Cloud9.
‫I'm going to remove the "Stephane"
‫and go back to "Hello World."
‫But I'm just going to add "Additional Outputs" right here.
‫And I'm just going to put my name, Stephane.
‫And this should be good to go now.
‫So I'm just going to have single brackets just in case.
‫Okay, so this is working.
‫I'm going to save my file.
‫So my application, the py file, is saved.
‫And if we go into my Git project.
‫As you can see the changes are being detected,
‫so I'm going to add it.
‫I'm going to call it "fix application."
‫Okay, we're good to go.
‫Control, command, enter.
‫And then I'm going to do git push yet again.
‫So you're seeing the real workflow of a developer.
‫And this is something that is really dug deep
‫into the AWS certified developer certification.
‫So yet again, let's refresh this page and see what happens.
‫So my application source has just been committed right now.
‫It's in progress.
‫And so once this is done, we're going to go
‫into the build phase, and the build should work.
‫Okay, so my application has now been deployed.
‫And so if I click on "View application",
‫Now we can see the output is "hello world,"
‫and the additional output is "Stephane".
‫So this has worked.
‫So it really shows you the end-to-end workflow
‫of a developer within AWS.
‫Now I'm just going to shut down everything.
‫So for IDE into Cloud9, I'm going to delete my environment.
‫So I'm just going to type "delete" in this field
‫to be done with it.
‫And then once this is deleted,
‫I'm going to go into my projects,
‫into my CodeStar projects at the top level.
‫And I'm going to delete this as well,
‫so I'll click on "Delete" to delete the resources
‫when I'm done.
‫So that's it.
‫I hope you liked it and I will see you in the next lecture.