and we're live hi everyone welcome to today's live today we are going to be doing another devops project in our devops X AWS series I'm very very excited to be doing this with you guys um there are so many learnings to be had in the next hour so I wonder where you are in this world put it in the chat and let's get started so what I'll do first is I'm going to share my screen so you can see um my working area and you're going to see that I already have my AWS console open on the left hand side of my screen and then um instead of the step-by-step project I actually have our community open in the right hand side of the screen so if you don't have access to the nexer community yet this is where you're going to get access to the step-by-step project guide that I'm about to walk through in today's um demo um if you are already in the NEX Community hello very exciting and here is how you can get access to the project that we're about to do so once you're in the community um click into that all AWS channel on the left hand side okay and once you're in you're going to see a tile right over here and it has what we need it says secure project def uh dependencies with AWS code artifact that is exactly this project today so let's click into it and there's that handy Link at the start that says start your project here that's where you're going to click as well boom boom done and we're here hi every thanks so much for being here today um did you get to do our previous project or are you Trucking along with the quick site project still oh my gosh very exciting that you're here all right so this is the project step-by-step guides landing page and I'm going to walk through this a bit quickly um because I can't wait to dive into the project steps with you very very soon um and like every project in the next Community there are always two options for you to do it the first option says tell want to do and I'll figure out some parts on my own this is a really great option if you are someone that likes to click around that likes to explore on your own that likes to do a bit of problem solving you know and option two says give me the step-by-step guide now this is really great if you're new to AWS and you're not quite sure where to start you know let's go through this project step by step together we're going to tell you exactly where to click we're going to tell you exactly what to type we're going to tell you exactly which tab to switch to um and this is a great place to start if you're just um wanting to do something Hands-On in AWS but you're really just wanting that guidance um so you can get to the Finish Line as well so of course in this project um we are doing part three of our devops xaws series which means that it will be a little bit fast if you haven't done the first two parts of the series yet that's why I do highly recommend that you check out part one Parts one and two of the series first um the links to those videos are also in the description box below um and also a little bit of experience with security it would also be great you know if you've done our awsam project on security um then you would be a lot more familiar with some of the setup steps we're about to do today if you haven't done those no worries we're still going to be doing all of the steps that you need to do this from start to finish without needing any special AWS account setup um so you can absolutely still follow this through as well cool now um what we're going to be doing today is you're going to learn how to use a service called AWS code artifact now think of AWS code artifact like this sort of like secure closet this like Treasure Chest where you keep all the building blocks that your web app will need to work um and these building blocks are called packages so just like you might need to store extra like batteries or light bulbs at home if you're ready if something goes out like if the electricity goes out or if one of your light bulbs just like Pops at home um code artifact honestly Works quite Sim similarly it helps you keep these copies these backup copies of these packages safe this way even if something goes wrong with the public repositories where these um these uh packages are stored in the internet you you still have everything you need to keep like working on your app um for context in Parts one and two of this project you would have learned how to create that web app from scratch and you would have learned um how to create a git repository um to store all of your projects code so now that you have your projects code all together in one place um there are a few things called dependencies that you're going to learn about and packages um that you will need to store with code artifact um so let's jump jump into it like every project demo we're going to be using option two today cool all right so I'm in the page that is showing um option two right now so this is our high touch guidance we're going to go through every single step every single click together um um and first of all please delete all your resources by the end of the day even if you don't finish the entire project um and this is really important to make sure that this project is free for you um I feel like AWS probably earns the most money from people ACD leaving things in their account okay I been victim of this before and I'm going to tell you now please make sure you delete all of your resources by the end of the day uh sometimes the sneaky thing is you might tie yourself like oh yeah like I'll finish this tomorrow and then I'll remember to delete things you never know what's going to happen tomorrow okay so you fin not actually end up doing uh finishing this project so protect yourself and make sure that you delete all of these resources um and we'll also be going through how to delete all those resources at the end of this demo all right and Step Zero is to get ready to document um make a copy of the documentation template that's linked here um so all you have to do is click on that link in your project guide and you'll get taken straight through to this template um and to make this template completely your own you're going to make a copy of it it okay so we're going to click on file in that handy top left hand section and then we're going to click on make a copy so let's make that copy right now and now this copy is your documentation um you might be wondering you know why do we write documentation for these projects you might have just noticed that I mentioned that you have to delete everything at the end of your project so how do you keep a record of all of your learnings how do you show people like this is what I've done if you're going to be deleting everything this is where documentation steps in it is the place where you will be capturing all of your learnings it is a place where you're going to show evidence of what you've learned show evidence of what you've created um and it is also a very sharable piece of evidence as well you know the way that you can put this in a LinkedIn post the way that you can share this in an email documentation templates are kind of like little Diaries um for every single project that you do absolutely worth the time to be going through to be writing project documentation as you do the project um because I think all of those juicy learnings like it is best documented in the moment so what we're going to do now is now that we've created our own copy of our template today let's delete that first slide that tells you to make a copy okay we've done that already um and if you like a little canva warmup or a little warmup to edit this um documentation template let's just click on your full name here and let's replace that with your actual full name so well I'll write Natasha on uh that's my full name but write your own full name cool that is all we need to do to warm up to our documentation template because what we're going to do now is we're going to jump right into the project steps one more time um so we can get started okay step one set up your web app and the get repository so these are steps that we went through in projects one and two of this develops xaws series and what do means is if you find that this setup is going a bit too quickly you're wanting things to slow down a little bit so you can hear the in-depth explanations please visit the video demos for those projects respectively um again the link to those are in the description box and how we're going to start is we're going to start from the very top we're gonna log in um to our AWS account as an IM am admin user and if you don't have that IM user setup or you haven't done that um or you haven't done that at all before um let's do it now together as well um so how we'll do that is we'll head to the AWS account as your root user so this is the account that you've always had ever since you first created your um AWS account and we'll open the IM console to start creating an IM am user all right um as a reminder why we're using an IM am user today uh it's because that it's because of two reasons okay the first reason is that a s will actually be protecting your root user from a few of the services we'll be using throughout this devop series um which means if you continue using a root user to complete this entire project you're going to be stuck at a certain point that says you can't Advance because you don't have the permission to do it which is quite ironic because you're using the root user but actually for um security purposes and for and to make sure you're not vulnerable to any sort of attack um there are going to be a few actions your root user can't actually perform um that your IM am user can perform um and that's why we'll be using we'll be creating that IM am user second reason is it is always always always recommended by AWS that you use your I am user for your day-to-day activities um and to use that root user when you really need to use a root user and that scenario would be when you really need to use it for financial and like billing um situations so what this means is ideally you'll be using you'll be using your IM user for all the projects that you do um and only going to your root user when you really need it all right without further Ado let's start creating that I am user now um and there's already a template for the username that you need to use I am net I am admin make sure you give yourself that access to AWS to the AWS Management console so you can actually have a very visual interface for doing your project today otherwise um from personal experience it gets a little hard without the Management console if you're a complete beginner as well um and I'm very comfortable with all of these default settings they're going to create a password for you um and I don't really need to create a new password for myself at next sign in um so I'll be deselecting that but if that's your preference keep it checked that's all cool um and I'm going to select next so when we attach permissions to our IM user we're basically creating these rules that says you have actually access to this this this and this um and since what we're creating is an ad am admin user we're going to give it admin access so um make sure you click that option that says attach policies directly and when you scroll down under permission policies this is where you're going to set up the rules that your IM user will get um luckily for us administrator a is first in alphabet which means you don't even need to search for it it's already right here it's in the second line administrator access and you can just click on that check boox next to it um and administrator access is pretty much the highest like the greatest level of access you can give to an IM user it will literally have access to like all the all the things that um you would want to do in an AWS account just except for the billing and finances kind of stuff that only the root user would have access to by default okay let's create that user now and pause here okay the moment your IM user is created let's just pause here don't don't don't rush into it I know orange but buttons are like very enticing to to click on but we're going to actually pause here and make sure we download the CSV file okay we're going to download the CSV file that gives us a copy of our IM user's username and password basically everything it needs to log in as an IM user and downloading it now is very very important because once you click out of the screen this option to download the CSV file for the current password is no longer available um and that is again for security reasons okay but you would have noticed that what we've done now is we have already created the IM user and what we can do is first log out of the root user that we've been in sign up and now we will kick off the project as the I am user now um so we're going to sign into to the console one more time but this time it's going to look slightly different um because this time we're using the I I am user to find your username and password all you have to do is use the CSV file so hunt for that CSV file in your downloads folder and you're going to see it pop up with um a spreadsheet that just has three columns it's super super simple um nothing too intimidating we're going to let my spreadsheet software my Excel warm up okay there we go it's ready now um and you'll see here super handy it already has my username and password laid out for me so just copy that username over and just paste that into the username field same thing with the password um and sign in ta Rio in the comments says great project thank you so much have you tried this project already how did you find it I'm very very curious now awesome and then Tada we're now back into our AWS account but now we are logged in as I am user so a great success and you just have to double check whether you are the IM user by just checking if it is your IM users's um username on the top right hand corner Alas and udak welcome hi back this is very cool um how are you going with the project cool the next step is we're going to create our Cloud9 environment and we're going to jump straight into it um I'm going to create that environment and name it nexor IDE make sure that you're using a new ec2 instance make sure you're using t2. micro as the instance type because that is the free tier eligible type um if you're clicking into any of these other ones you're probably going to get charged um so make sure you're clicking on t2. micro and for the platform okay this one is easy to slip up on okay because the first like 70% of the letters look exactly the same but instead of Amazon Linux 2023 select Amazon Linux 2 instead okay and this selection is pretty important because later on when you're going to be running a few commands um there's going to be a few commands that Amazon Linux 2023 um will probably say like uh this this command I don't really get it but Amazon Linux 2 um will be a able to successfully run all of the commands you do um and yeah I think that is all the setup we need to create our Cloud9 environment um again if you're wanting that slower explanation on you know what is Cloud9 what are we creating um please check out that link to the very first project in this devop series cool it's all created now so we're ready to open our environment are you ready okay now the first time you open your environment it's going to take about 15 to 20 seconds for it to actually be ready for you to um enter a few commands to it but that's okay we're just going to wait together um while we have a think about what's going to happen next so what's going to happen next is we've created our environment and this environment is where we're going to be writing our code managing our code creating that project um and the first thing we're going to do to make this happen is install two very handled tools two very handy tools um that will help us with creating our Java web app these two tools are called Maven and Java um and how we'll do this is first we're going to install Maven um all right our ID is already ready for us so let's install Maven right away um the code or the commands to install Maven is already right here all you have to do is highlight it from the step-by-step guide and paste that into the terminal cool don't forget to press enter by the way after you paste that in um and once you enter it I'm gon to expand my terminal so you can see this all unfold but um our terminal is now filled up with lots of lots of lots of little um messages just to tell us that it's process you know like it's progress with installing a maven okay I'm gonna zoom in a bit more as well so you can see this in detail with me okay yeah do you see that all of these um messages are coming through and it's just the terminal telling us like okay this is what I'm installing now this is where I'm at with like installing Maven into your ec2 instance um and it's looking great cool so once that's done um we're going to go straight into installing that next tool which is Java so all you have to do again is highlight the necessary commands Okay these four lines over here and paste that into your terminal right away okay again let's press enter don't forget to press enter at the very end and Tada again your terminal is getting filled up with all these messages reassuring you that it is installing Java and it's also a great place to diagnose um any errors you know if let's say your terminal actually runs into an error and says oh sorry like I can't install this um often the terminal will give you a few messages to give you a few hints on why that is you know and whether there's anything you can do to solve it okay so to verify that we have just installed Java and Maven um correctly we'll in we'll run two more commands one is called Java version so we'll put that through and the next is mvn which stands for Maven DV which stands for version okay very very cool all right so what we see here is a success with installing Java so that's awesome and let's run our Maven command okay very cool so you might have noticed that just now the first time I ran my Maven command it actually says nvn command not found if you see that happen first things first Don't Panic this happens all the time what you can do first to diagnosis is just hand type that command instead of copying and pasting it from the step-by-step guide so what it just did just now was I hand typed it into the terminal ran it and now it works um so it's telling me what I need to see Apache Maven 3.5.2 that's the version we need um and let's move on to the next step which is all about creating the web application using the tools we just created you know we've installed Maven we've installed Java now we're going to put them into work okay the next terminal we're going to put uh the next command we're going to put through is all about saying hey Maven can you use this template you already have um to create a Java web app and actually just create that web app for me right now um and it's such a great way to um set yourself up you know to create a web app because that template's already there it saves you a lot of time saves you a lot of work um and you can get straight into creating the meaty juicy parts of your web app and less time on setting up the infrastructure for it if that template's already there um so once you run this command you're going to see that something special pops up in the left hand side of your screen so let's let me expand my left hand side of my screen so you can see it um but do you see that there's a folder now that says NEX work- web- project so that is the Java web app right here and it's baby stages um and you can even expand it you know to see all of the files that Maven has just created for us so thank you so much Maven for your service um and here we have our um Java web app you can even double click on index.jsp and this is where we can start customizing our web at so index.jsp is where we can start writing um what our web app is actually about you know what the users are going to see when they visit our web app um and I am going to cool pull down my terminal now so you can see more of my screen um but perfect let us edit index.jsp whoops ah I think my terminal is a little bit too tall yeah actually need to even drag it Up drag it down from the very top now though that was interesting um double click on index.jsp so you can start editing it right away okay let's have a look now um so we already have some sble code ready for you in the step-by-step project guide but if you're very familiar with HTML and you want to create your own webat why not you know have that have that creative freedom in the meantime I'm going to use that template to just Define something very very simple and repl your name with your name so I'm going to replace your name with my name here so that it says hello Natasha um and once that's done don't forget to save your changes so um how you do that is you can just press command s if you're using a Mac or control s if you're using a Windows on your keyboard uh the other way if you prefer is to use file from that top um panel and click on Save here and it does the exact same thing but yeah very exciting next up we're going to create that repository in AWS code commit so this we're now entering into the part uh project two territory now in this devop series so now if you're thinking okay what we're doing is a little bit too fast for me or oh I would like to hear a more in-depth explan a more in-depth explanation of what's going on I'd highly recommend um checking out the video for part two or project two of this series it is also in the link in the description great now to kick off um our repository in AWS Cod commit what we're going to do is we are going to search for that console the code commit console in our AWS account so I'm going to switch tabs back into where I can find my AWS Management console so we're now out of like the Cloud9 land and back into our AWS Management console land um and use that handy search bar at the top always to find what service you're looking for I'm looking for um ad code commit so I'm going to type that in I'm going to click on code commit right here um and we're now ready to create our repository so how we do this is we click on that orange button that says create repository and we can name it right away in this case I'm going to name it NEX workk web project I'm going to do a fancy little dash one um because I already have this repository in my account and I'm pretty sure two repositories can't have the same name otherwise um code commit might get a bit confused so you can name yours nextwork Das uh nextwork d web- project and give it a little description as well you know descriptions are optional as you might see here but they're absolutely best practice as well you know just to give anyone that's visiting your repository a bit of context into you know what's in this repository in our case we're you we're creating a web application for the NEX workk homepage um so that's what we're writing in the description okay let's click create and dive back into our Cloud n environment so we have our um git repository all set up now with Co commit and now in Cloud9 we're going to set up the git identity um and how you do that is again in the terminal we're going to typee in our handy little command the first one is git config Global username um which is basically telling git like hey I'm here um my name is Natasha my email is you know Natasha atwork.org um and now when I save any changes or make any changes you can track those changes back to me back to my identity it's almost like creating a little user profile um so that git will always identify you once you make those changes um to your repositories and in my case I'm gonna just type in my name now Natasha hi Gabrielle that is such a sweet comment by the way that is the best stop stop it that's too flattering now um but I really oh I really appreciate it and thanks so much for being here again um and as I mentioned here oh I don't I'm not sure if you can see this very clearly so let me just zoom in a little bit for you um get config Global now I'm going to be setting up my email email in here uh get config Global user. email is Natasha next.org boom done so that is our git identity all set up as a bit of reassurance if you're wondering I already have a GitHub account I have a gitlab account I have a git X account um this won't create a new account for you this is a different kind of system that's happening within your terminal right now okay so now that we're here we're just going to make sure that we can create a local repository so I'm going to put paste in the commands that are already given to me and that creates my local repository um which is basically my local workspace that's going to track all the changes I make to this web application um within my local computer in this case that local computer is the ec2 instance um that's hosting your uh Cloud9 IDE and this local repository is different from the cloud commit G repository we um we've hosted in the cloud so now it's time to connect them how do I make sure that the changes I make in my local computer can now get pushed through to what's happening um to that code commit repository that's in the cloud so to to connect them first what I'm going to do is I'm going to head back to that code commit console and clone the URL and then paste uh create a new command in my Cloud9 terminal now I'm back in my local workspace and say hey local workspace I'm I'm going to tell you now that you have kind of like a main workspace almost like a main folder um for this project and that folder is you know the code commit repository um and you know how I just copied in that https that URL to the code commit repository just paste that in here and we're all sorted just like that so now we can commit and push our code um with these commands and these are the three golden commands um that would that will help you with doing that so the first command is called get add the second one is called get commit and the third one is called get push so when whenever you want to save your changes and make sure those changes get represented in your code commit repository that's in the cloud um all you have to do is run through these three commands um and what I did just now was I just copied what was in the um stepbystep project guide I pasted that in my terminal and hooray let's go check code commit repository and see if all my latest changes are there so I'm going to refresh what's here and boom here we go you know um You Might Recall SRC pom.xml oh sorry I think I just clicked out a bit too far there but you know in my code command repository you can now see the fotos and files that were created um in um in my local repository over here so let SRC pom.xml you can see that here now and you can even click into this folder and see all of the nested folders and all the nested files that are inside looking very very good that is chef's kiss perfect um and that means we can move on to the next step we have now finished all of the setup for our project that we're doing today about AWS code artifact so now we're going to start slowing down a little bit I'm going to be doing a bit more in-depth explanation um because we're not entering kind of like new content or like new learnings land U so thank you so much for spending that first like 28 minutes with me setting up for this project but we're ready now let's do it so first thing we're going to learn is now that we have a working Cod commit repository that's going to store and Version Control our code the next thing we're doing is to use AWS code artifact to secure our project's dependen you might be looking at these two sentences and thinking Natasha these two sentences they're not connected they are not related whatsoever what do you mean like why are we going from version controlling our code to securing project dependencies what are these dependencies anyway so let's start these explanations from the top what are project dependencies just now in Cloud9 we've been creating a web app and just now in code commit we've been storing our web app's code code into this very safe repository in the cloud now we're going to talk about dependencies and if your application depends on a package to function correctly which means that your app won't work as it should or it won't run at all if the package becomes unavailable then that package is considered a dependency for your application um no matter what kind of web app you're You're Building any web app will have its dependencies okay dependencies are absolutely like very very common in any kind of web app create so what that means is um this is a very very common use case you know having dependencies that you will need to now store backups of um for example react.js is a very very popular package um and package means a bundled set of code and files um and react.js is a very very popular package that developers will use to create these interactive components in your websites you know for example if you have a website that can change without you having to reload your page you know for example if you have a website that's all about like here's your online to-do list and you can like write this to-do list without needing to refresh your page each time um there's there's often react.js kind of like playing here helping you helping developers create these interactive websites um so that's an example of a dependency because now imagine if react.js is doesn't exist anymore maybe that means that the developers that created their web apps with react.js those web apps aren't going to function as they should you know now maybe their users will will need to reload their page um to see their their page um update and that is considered a dependency because um the web app isn't functioning as it should so again you might be thinking wait a second what our packages can you please backtrack a little bit if um you're new to this that's completely okay one of the first things you've done in this project is install apachi Maven you might remember that was one of the very first commands that we ran when we um hopped into our Cloud9 environment for the very first time and part of that building um part of Apache maven's job is to help with building your application later on building means being able to being able to bundle up or pull in all of the software and the files that you add to your project um to add these new functionalities and these packages that Apache Maven is going to pull in to um help you add those functionalities to your web app these packages can come from public repositories and these public repositories means other developers have created them they've put them on the Internet for you to use often for free um and now people are creating some really great web apps using these tools but again because these are tools that maybe your web app now relies on these packages are also now considered dependencies and dependencies can become a bit of of a risk we'll find out why in a second cool so first we're going to search for code artifact in our console so here in the console use that search bar to search for code artifact so you can visit your code artifact console in this way or another way is you can use the sidebar here so you see how we're in code commit but that sidebar is actually shared across all of the services that make up the cicd pipeline and um which is like the entire devop series that we're doing by the way so you know we have code commit at the very top then we have code artify code build code deploy code pipeline in this entire series of devops projects we're going to be touching on all of these um but for now we've already ticked off code commit you know when we created that when we created that g repository next up we're now going to jump into code artifact so let's jump into code artifact now to see what it looks like okay here we are um what is code artifact you might wonder you know that might be your next question um and remember what I said just now about having these dependencies are a bit of a risk so these resources that live in the public internet um they might it's there's no real guarantee that it's going to be available to you forever you know there's going to be a chance that those public resources suddenly become unavailable or maybe they even become removed like what if the cre person that created this um package is like yeah now like I I'm G to remove this for some reason one for some for some random reason um in the real world an outage of a dependency can completely break that cicd pipeline we're learning about you know for example let's say a dependency is gone now Maven will fail to build your web app so any testing and deploy in of those latest changes are also forced to stop so this is where code artifact will come in think of code artifact as his private storage locker for you to keep a backup copy of all of those dependencies for your web app even if a dependency goes down in a public repository that it comes from you know from the place that Maven would pull from um in the public space you have that backup copy in your private storage locker in code artifact and that means you can continue building your web app without any hiccups isn't that just so good I have had so much appreciation for code artifact ever since I learned about what it does like it's truly there to give you this very secure copy of some important very very important files that you'll need to make sure that your web app can still be built um very successfully um so I always think about code out effect as a way to manage risk you know in your project um all right you can imagine how code artifact adds a layer of reliability and security you know it protects your development process from these external disruptions you know this these external disruptions being um dependency suddenly becoming unavailable and that is why it's super relevant to a devops role all right so um what this was talking about is like hey did you know all of these cicd services are all connected in the same navigation bar we just talked about that so we can just scroll down um and let's start by creating a domain and you can find domains in the left hand menu of um your navigation bar so let's click on domains and let's create one cool so uh my account already has a domain which is my bad um but what you're going to see is exactly the same page as this except without this yellow Banner um and all you have to do to create a domain is just type in type in a name that's it that's truly it um you know for me my domain name is next workk and what I'll do next is just create domain and that's it and then you you would have a domain created um think of domains uh as these big folders where you can what which you can use to organize and keep smaller folders of your project materials you know each of these smaller folders will be called a repository and the collection of all of those repositories is called a domain at the very top um and you also notice that your domain gets a URL and this URL is basically the very key entry point that applications will use to fetch and store the dependencies that that live inside the repositories in your domain so think of the domain as like this big folder or like this big gate um that any application that wants to um get access to the repositories under will have to go through your big gate and then once it go through the big gate all of the repositories that are storing your project dependencies are now um accessible you know to the applications that get through so yeah typically a developer would just create one domain to manage all of their artifacts you know just one big folder to manage all their artifacts in one folder um in one place but larger companies might end up using multiple domains if they have vastly different projects you know or they just need to isolate resources for security needs um but yeah like I mentioned all you have to do is type in niw workk here and you can just click your uh you just create your domain right away um very very handy so right behind that once you've created our domain you can click on repositories and let's create a repository now um how you can do that is you can click rep create repository um and you're going to see I already have two repositories in here um from testing this project right before this so you might have zero things in your um repository page that is completely what um what we want as well uh what's important is we're just going to create a new one so let's create the repository and let's name it nextwork packages oh uh since you know what I'm going to delete the repositories that are on my screen so that we can all start from the top together I think that would be best so let me quickly delete my repositories so we can start from the same place and let me delete this one too boom boom done okay so okay now this is probably going to be the screen that you look at um most and let's just create the repository right away click on create repository let's click on repository name the field here to give it a name um we're going to call it next packages and there's even a description field packages for the next work we at by the way if you're still watching this how about let's put in the chat how you would explain packages or dependencies to someone else I feel like this is this has been one of the hardest things for me to explain so I'd love to see how you guys put a spin on it or give your own take um you know how would you explain packages how would you explain dependencies I love to see it in the chat okay so we have um we have created a repository now called Next packages um and we're going to select something called the public Upstream repository okay and we're going to that was a misclick we're going to use Maven Central store okay and then we're going to click next okay let's stop here for a quick second and just talk about what was that public Upstream repository we selected because I've never seen this term before you know before using uh code artifact so let's learn about this because it's quite important your public Upstream repository um is not the same as this repository that you're creating now okay these are two different repositories but they both getting ated so why is that um so let's take a look at the short description under Maven Central store it says it provides Maven artifacts from the maven Central repository so this is another repository this is another repository and then this is another repository so we have three repositories now how are they connected how why did they exist okay so starting from what we're creating next with packages this is our local repository think of this as your local toolbox that you keep all the software packages you've already installed in your computer in this case this computer is the easy2 instance that's running in our Cloud that's running our Cloud9 environment so that is the Amazon Linux 2 you know that ec2 instance that we set up at the very start so when Maven builds your project when Maven decides to you know compile all of the code that you've created it first checks your local repository to see if the required packages that it needs to um build your project if it's already in your local toolbox but sometimes it doesn't you know if the needed packages are not in your local repository maybe then checks your Upstream repository so that is the public Upstream repository we've just selected so this is kind of like the local hardware store that you would visit if you don't have what you need in your in your toolbox at home um it is set up quite close at home it doesn't have everything but it does store a lot of tools that developers would often use you know so um think of it as like that handy option around the corner that you can go to instead of having to drive really really far to that big cost go to that big Warehouse every time um so you will go to this local store because it's faster and more convenient you know same in this scenario if Maven can't find what it's looking for in your local toolbox it's going to go straight to the public Upstream repository next um to find um the packages that it needs to build your web app but what if a public Upstream repository doesn't have it you know one of your local hardware tools store says oh sorry we don't have that in stock when that happens we go another we go another level up and we now visit the naval Maven Central repository so this is like the huge Warehouse that stores a vast amount of tools and supplies it's open to everyone in the world and it has a very very comprehensive collection um but that's the reason why it has really really high traffic and it's not very practical to go there there for every single thing um it is pretty pretty far away compared to that local um store around the corner so Maven would only visit the maven's central repository if the required package is not even in that local um hardware store it's not even in Maven Central store if it really really needs to go in the delevel up so think of it as first Port of Call is your local repository so that is the that is the number one place maven's going to go to okay can't find it doesn't have the Pack P I'm looking for fine next stop Maven Central store you know um but if even Maven Central store doesn't have what what it needs fine let's go to the maven Central repository um and across these three repositories um Maven should absolutely be able to find all of the packages that it needs to build your project cool uh next all right so we're going to click next I just realized the step is not in the step-by-step guide which is my slip um but in this case it is just asking select the AWS account that owns your code artifact domain just select um domains and repositories must exist within the same AWS region currently set to Asia Pacific Sydney okay great um in my scenario you know because I created my domain in this account um this AWS account you know owns the domain and select next cool okay I think it is time for us to even check out this cool little flow diagram here um that summarizes what we've just learned cool okay what does this diagram say it's like a package flow review how packages flow from external connections through Nex workk to NEX workk packages nice I love it I love seeing this so much um remember how we just said that there are these three repositories M will kind of go through step by step to eventually find what it needs this is basically that step byep kind of flow in a diagram you know our local repository you know Step One is next packages the Upstream repository step two is Maven Central store and then the big one the maven Central repository um which is called Maven Central here is you know step three it's the public one um so you will see how packages is kind of get kind of get kind of flow first from the public space into that local hardware store and then from your local hardware store into your um into your personal toolbox okay so I think this is where we can review and create the repository now so let's let's click on click Repository ah I have accidentally clicked on create repository a bit too soon because we were supposed to take a screenshot it says take a screenshot of the package flow panel showing the connections from public Maven Central to next packages oh no uh oh no I was supposed to take a screenshot of that wasn't I I took the liberty of explaining that entire flow knowing I needed to screenshot it later and I still forgot to screenshot it okay team when this happens you have two options okay the first option is almost like The Honorable way to do it which is like to click repositories create a new one you know let's just you can you know create a random new one um that you don't need to save you're just creating it for the sake of getting it to that page again uh I'm just going to call it next to packages to okay quickly Zoom to the public upam repository make sure you still select this one uh and then again this account owns the domain next take a screenshot of the package flow and then we're going to abandon this one okay package flow yeah Gabrielle in the com in the chat says you can create a new one to take the screenshot that's what I'm doing now sh okay so I've taken my screenshot now I don't actually need this repository I already have what I need uh so I'm going to go back to here uh which is the page that I left off at um but since I've taken my uh screenshot I guess we can I guess we can fill in our documentation so we have our copy of our documentation here and the first thing is called create a repository okay we're going to paste our screenshot here boom bust it into our um into our frame so that it fits our screenshot fits nicely into the frame that's already provided in the template um and fill in some prompts you know uh there are already a few prompts in this template that kind of encourages you to explain these things to show your learnings so let's do it AWS code artifact is uh is a service that sits in the CI CD pipeline um I am using it today to store backup copies of packages and [Music] importantly dependencies relevant to my Java web app oh I accidentally answered the next prompt but I I think we can actually go a bit more specific here the reason why I'm using Code artifact for my web app is for security uh is for security risk management and continuity um now even if the public packages now even if the public packages or dependencies dependencies of my project is of my project aut atically correct I'm wondering this out loud right now now even if the public packages or dependencies of my project um I would leave it for now but if it's not grammatically correct let me know in the chat I'm very curious now um even if the public packages or dependencies of my project uh are no longer available there is a copy in aw coder in my AWS code artifact repositories repositories um to make sure I can keep developing my web app thank you to the president sending hard reactions in the chat I appreciate it okay uh oh well clearly I'm a bit of a talkative person because I've already maxed out my my documentation templates uh text area um so what I'll do is I'm going to duplicate this page so that I can talk about this over two pages instead of one okay um all right so in my second page I'm going to keep going G to keep talking okay and my second page going to keep talking by continuing where I left off of okay instead of a single repository there are actually three connected repositories that Maven uses to fetch packages Lawrence in the chat says let's go Nat thank you so much let's go Lawrence you are on fire by the way I'm watching the number of uh projects that you're blitzing through um in the community and it is incredibly impressive so a shout out to Lawrence that's in the chat right now so instead of a single repository they're actually three connected repositories that Maven uses to fetch these packages fetch these dependencies the first is my local repository which explain when Maven uses the local repository we know that which Maven checks first we know that this is the repository that Maven will check first um which Maven checks first for the packages dependencies of my web app the second is ah the second is my public Upstream repository which Maven will check next um which maybe we'll check next if a package is not in my local repository the third is the maven Central repository so let's talk about that the third is the maven Central repository which is a public Repository with the greatest collection of packages um for Java applications however um however Maven will only visit this repository if the first two do not have the packages or dependencies it is looking for due to high traffic going into the maven Central repository so these are my quick I guess um almost like relaxed explanations um and it's how I personally understand these Concepts always don't give yourself that pressure to be like I have to write the perfect definition from the get-go um because I feel like learning is all about just being able to reflect on where you are at the present um and sometimes even if you don't have that perfect explanation yet write down how you understand it in the mean time because in the future maybe you can reflect back on these learnings and be like wow i' actually Define it a little bit differently now and just like that you can see how you grow you know in your in your understanding of all of these Concepts okay Okay cool so we have explained um we've pasted our screenshot and we've explained um what we've done so far and we can actually move on to the next step now vosco VM in the chat says hi Nat hello hello welcome to this live demo of our project and I hope you enjoy um have you started the devops project series already or are you starting fresh I'm very curious okay cool step number three let's connect the code artifact repository so on the next page we're going to click on something that says oops I'm using the wrong tab let me just flick back here so on the next page let's click on view connection instructions okay and in the dialogue we're going to select Mac and Linux because we're going to select U Mac and Linux because the ec2 instance that's hosting our Cloud9 environment is a Linux computer uh and then for the package manager client do you recall who is our package manager the answer is Maven cool why are we viewing connection instructions what's going on what does it mean by connect a repository um right now we've created a code artifact repository that's in the cloud that is going to be um that is going to be you know hosting and storing all of the dependencies for our project but as at the moment code artifact isn't connected to our project yet it is just in the cloud saying okay I'm ready to start storing dependencies I'm ready to start storing packages um but uh which project and I'm am I going to be storing these packages and dependencies for I don't really know yet um so to make sure that it is you know this connection exists we're going to be going through the connection instructions you know which is what we're doing right now um so yeah we're going to select our operating system it is mac and L we're choosing mvn as our pack package manager and now we're going to copy the code that's in step three okay gonna select copy oh it's Eric vosco V is Eric wow welcome welcome welcome welcome to this live demo it's so cool to have you here thanks so much for being here um okay we're gonna copy the commands that are in step three and we're going to run that straight away in Cloud9 so let me just paste that in in the terminal run that and that was really fast it's already run so that was very successful okay I'm going to minimize this so you can see more as well okay just like that uh and what's next what's next is oh we've already run these commands so we're going to skip through that in the stepbystep guide uh what's next is you might notice we still have a few steps left in the connection settings panel you know let me flick back here and oh it's right uh do you notice that we actually have a step four we have a step five we have a step six wow there's actually more um that we need to do to connect our code artifact repository with our project but to do these do you see how it says add this add your server to the list of servers to your settings.xml what is settings of XML have we seen that yet no we haven't actually look at your CL 9 environment and look at the uh files that are inside here do you see a settings.xml no it doesn't actually exist yet so let's create that file actually uh because it's telling us that we need to add this code to the file uh so let's create the file that it's going to go into cool what is settings. XML you know how is it different from pom.xml that's over here um you might recall that P XML was a file that we kind of touched on in our last project and p. XML creates the web app uh the p. XML file gives Maven the instructions on how to build your web app so think of it as a recipe that tells May the ingredients I.E the dependencies the packages and how to put them together to build the web app um but settings are XML is slightly different like almost like twins or they're like sisters they work very closely together I feel now that Maven knows what dependencies it needs you know it has the recipe book settings.xml which is the file we're about to create that's going to tell Maven where do you find these ingredients okay um let's say like there's this certain recipe that says you need six eggs and you need three tomatoes so uh if you're just looking at this recipe you're like okay six eggs Three Tomatoes but you don't have any of these ingredients so where do you find them settings at XML will tell you how um and and specifically in the scenario it's going to tell Maven where to find the dependencies and how to connect to the right repositories like our code artifact repository to get access because again code artifact is going to be storing a copy of all of the dependencies that are um project is going to need so it's gonna settings XML is going to say like you're GNA visit the code artifact by doing this this is where you're G to find code artifact and this is how you're going to get access to the dependencies that are inside um and that's why it's so important to create this F you know imagine if those instructions don't exist M's going to be like well I know I need these dependencies but I don't actually know where to find it um so let's create that settings XML file by first running this first command okay we're going to run that first command and then there's a second command here as well that we're going to run so let's run that through as well so we're just going to paste that into our terminal I'll click enter and do you see that bam just like that the settings of XML file is already created it's already in our leftand navigation panel ready for us to click on so I'm going to click on that um and here it is ready for us to use how easy was that that was very very fast um if you'd like a bit of a hey slow down you know we just pasted a few commands in a terminal what what they talking about let's go through it so the first line that we pasted this thing is telling your computer hey can we go to the folder where your where the project files are stored again remember your terminal unfortunately doesn't have hands or it doesn't really have the ability to click and drag things um we have the ability to do this because we have a very nice and visual interface um on our computers but terminals don't really have that interface so you actually need to give them specific commands to be like oh can you click into this folder um and now CD which stands for change directory is command that you tell um your terminal to be like okay now double click let's click into this so we've clicked into our project our webat projects folder okay and now the second command says Echo settings these settings tags and a settings of XML so what does it saying um the echo command just tells your terminal to Output this line so it outputs the lines um this tag called settings and there's like a forward slash n and then there's like another the tag that says settings so what this means is the for sln is a new line do you see how in this file there they aren't on the same line they don't look like this do they the moment it was created it looked like this oh it looked like this and that was because that for sln was a new line character um that enabled these two to be on separate lines um and Echo um is basically means output so the first part says output these two tags you know settings settings with the new line character in between and then there there's this little arrow that says settings. XML so what that last part of the command was saying was okay so you know you need to Output this uh this text output it into a new file called settings.xml so it's basically saying like push that output that you're about to create into a new file c settings.xml um and that is why that new file got created very very cool so we've created our settings of XML file now we're now ready to take on all of those connection settings that were still left in our code artifact page so let's switch back to that code artifact Tab and we can see that we have all of the code that we need to paste into our settings.xml file first things first it's our servers so let's copy that code and let's put that here okay and on your keyboard press enter enter okay so now we have new lines in our um in our file and this is just going to help to make things look very very neat um it's not absolutely required but it just helps with making your code look really really neat um and then next is step five step five also has its bunch of code so let's copy all of that and let's put that through as well paste that into your um into your settings XML file enter enter flashy that was very nice um and same thing with step six so copied it and then paste it done should we you don't need to go enter enter for the last one since it's the last one but you know you can if you want it's all it's up to you it's up to you okay so what was the code in steps four five and six saying you know I was copying a lot of code here I just copying and pasting it copying and pasting it copying and pasting it but what did they actually mean so these code Snippets are basically um additional settings that maven's going to work with um in order to get access to all of the repositories and all of the dependencies that are stored inside code artifact okay so when we copy the code and step four that section was called servers right do you see the tags that says servers you know it starts with a servers thing and it ends with this little servers bracket so this is called the servers section um and this section is where you store your access details to the repositories in this example you've added your authentication token do you see how it says off token here so you've added an authentication token which is kind of like an access pass it's kind of like a I have access to code um artifact kind of pass or wristband that will help Maven with getting access to the repository that's storing all of the packages um in code artifact you know that's the N work packages repository we set up in the previous step um next one is profiles now this section is where you write this little rule book in Maven on when Maven should use which repository we only have one repository okay we only have one package repository in this project so it's less visible the impact of this section but please know that this profile section is so so so important when it gets to more complex um projects it's going to be pulling from multiple repositories you know if it's going to be pulling from multiple repositories how is Maven going to know oh in this scenario I'm going to pull from this repository okay then in this scar I'm going to pull from that repository um how it how it's going to figure that out is from the profile section um so that's what this entire section was all about ours is very very straightforward because we only have one repository to pull from um but you're going to see this section become a bit more stacked if you ever see um if you ever see with like multiple repositories in the project um relevant to the project okay next is the mirror section so this section which is like step number six okay DC is optional so the mirror section is the backup location um that Maven can check if it can't find what it needs in the first local repo because oh thank you so much Reuben thanks Ruben Ruben said super interesting looking forward to coming back to the project in due course me too I'm very very excited as well thanks so much for being here today Ruben the mirror section sets up these backup locations that maen can check if it can't find what it needs in the first local repo it goes to so I know that we've talked about this flow that goes from your local repo to the public upstream and up to Maven Central repository but what if there is actually a backup repository a backup local one that Maven can check before it needs to go to that local hardware store um so that would be like the mirror section so you might have noticed here we don't really have another uh another repository that we we Define here all the time it's just nexor packages nextwork packages and what that means is the backup location we've set is the same local repository it's next packages again this means that for any repository requests denoted by this asterisk here in the mirror of kind of line um for any repository requests Maven is just going to take those requests to the next packages repository and see if the required packages are in there okay the reason why this is the case for our project is because our nextwork packages repository is the only one that we have we're not in a situation where we have multiple local repositories right now but you can imagine how this is a really great um this is a really great section to add if you're in more complex scenarios and also it is always a good idea to set up this backup um kind of backup repository option as soon as possible from the very very start um so that you can catch anything just in case in the future there aren't any backup um repository set up so now that we have all of this code this amazing code in our uh in our settings.xml file I think it's about time we start documenting some of these learnings I think those was that was a pretty juicy like 20 minutes learning about how this works so take a screenshot um take a screenshot snippet of your code which is your settings of XML file it is going to be hard to capture the entire file by the way I know this file is like pretty hefty um so all you need to do is capture a section of it so let's screenshot a section just like this that looks pretty good I'll take it um and paste that screenshot into a documentation template okay uh and boom put it in like this very nice um so what you did next was you connected your Cloud9 IDE to code artifact so that why did you connect your IDE to code artifact it was so that code artifact NOS which project it is going to be storing dependencies for um and in actual fact we didn't quite connect our IDE I feel I feel like what we did was we we connected our we I I connected my uh web app project via my Cloud9 IDE like Cloud9 IDE was kind of like the channel um through which I connected my web app project to code artifact um it's not exactly like we're setting up a connection between code artifact and Cloud9 directly we're trying to connect our code artifact repository with our web app project and how we do that like the platform for doing that was the Cloud9 IDE um and I created a new file called settings.xml in my web app settings.xml is what is this file what does it do what a good prompt I feel like I really needed to recap what this does so settings.xml is the file that will that will give Maven instructions for on where to find the dependencies uh Maven will need to fetch need to fetch and something else can you recall what else it does and how Maven will get access to these repositories to these repositories um that are storing these dependencies so the code I pasted into settings.xml were provided by code artifact I did not have to write from scratch the stimits of code explain the code you put into settings. XML what do they do ooh this is a good prompt what did it do um let me think explain the code what does this code and settings. XML do H I'm going to say a dent code stores authentication tokens authentication tokens to code artifact and sets up uh and defines when Maven will visit which repository repository uh plus it also sets up something else what else does it set up it sets up the mirrors it sets up plus where Maven should visit to find backup local repositories which is optional I'm GNA make that very clear to myself okay all righty let's move our screenshots down to make space gosh I must be very talkative today um I am maxing out the space on my uh documentation template so quickly um but that's okay all right don't forget to save your settings XML okay save that bam it is finally saved and next we're going to compile our application using this following command so let's compile it right away and what does compiling mean compiling is like translating your project code into a language that your computers can understand I think it's very important to um to realize that even if programming language looks very very technical we're not actually speaking computer language straight away this programming language or like what we're defining in these files in our code still needs to be translated um into machine code that the machines can actually understand and run um so that process of translating it into machine code is called compiling um and when you compile your project you're also making sure everything is correctly set up and ready to turn into a working app so compiling is a great way just to make sure that you've actually set up your web app correctly there isn't anything you've forgotten there isn't anything you still need to install um and look at that it is just compiling straight away fast the first time you compile your project this is going to be running for a little bit of time because it is the first time that Maven is going to be um fetching all of these um project packages and dependencies and eventually storing that in your local repository do you remember that flow diagram that kind of goes from uh Maven Central store you know arrow down there was that uh actually I just realized I have a copy of that uh and it was like arrow down the Upstream repository and then arrow down repository so what's happening right now is Maven is checking this and it's going okay you have none of the repositories none of the packages and dependencies I need so I'm gonna have to go here to look for all of the packages and dependencies I need to run my web app and once it has it it has that um it can also store a copy of that in the repository here as well um so that is why there's always like this Downstream flow because once it has a copy of that it can just store or once it fetches it for the first time often Maven can just store a copy of that in the um next repository down the list so that the next time Maven needs it it's a lot faster to find it okay cool beans uh so we have compiled the code and now let's head back to our code artifact console oo interesting what's going to happen now so all you have to do is exit out of that connection instruction stuff and click on the refresh button what's going to be here what's going to be here wow do you see that this was not here just a second ago was it but look at that these are all the packages just for that simple web app we've created isn't that immense it's just amazing isn't it the amount of like hidden tools and resources that are all working together in the background just so that we can have a nice awesome web app in front of us um when we're using it so much appreciation to the way things are built um it's it's honestly just fascinating uh and I feel like it's one of those things where the the deeper you dig in the more you're like oh I I did not know it was going to be this like immense you know this big this space um so it's like a constant state of awe I feel when you're learning this kind of stuff okay so yeah again there are packages pages and P pages of packages here pages and pages of packages it's a bit of a tongue twister anyway what's happening here when your project was being built Maven successfully fetched all of the tools and materials your web app will need these were all downloaded from the Upstream repository or that mayen Central repository and now they're available as a copy in your local repository over here inside code artifact so cool so let's take a screenshot of this packages panel uh because it is just so cool there's so much in here um and let's put that into our documentation template plus write a few words of explanations okay cool let me grab my documentation template once more uh and let's paste that screenshot in the next slide that's called test the connection um and let's paste that in here ah beautiful beautiful this a great table that's just a bit of a peek into all of the packages that are now inside my code artifact repository and yeah let's have a look to test the connection between Cloud9 and code artifact I compiled my web app compiling means o he Hefty question translating my web applications code into machine code that servers can actually understand and run wow thank you so much Eric Eric says this is interesting and your explanations are smooth thank you thank you so much I feel like it is a constant want to explain things even better even smoother um yeah I feel like hopefully by the time we get to uh project six of the series The explanations will become even more smooth um in terms of how all of these services are related to each other and how people can really get that grasp of going from like okay I have zero experience to oh I have a pretty good understanding to the way web apps are created and how like the cicd pipeline can really support that creation and that development process and that deployment process as well um all right back into the documentation so after compiling I checked H which repository did you check after compiling your web at what did you see I checked my local repository and saw that my local repository now has pages and pages of packages inside exclamation this means Maven has now grabbed packages from the Upstream Republic repository or Maven Central repository whoops uh mavid Central repository um and installed kept a copy locally and now we are seeing the entire code artifact like the reason why code artifact exists kind of an now we have a copy locally in our local repository so now imagine in the future so a package called plexus class World suddenly goes down in the public repository um and everyone's like oh my gosh you know this package is no longer available right now but you're like well actually it's okay because I have a copy in my local repository I can just use that copy instead of like freaking out because um imagine if you don't have a copy and you're like oh okay I I can't actually build my web app anymore because one of the packages that it needs is not available you know that it is like these kind of scenarios we're absolutely avoiding um with the power of code artifact and having these kinds of tools with us okay last step for today's project well in terms of like the technical part of this project is to set up an I am policy for using Code artifact why are we setting up an I am policy you might wonder I'm going to answer that with a question what services do you think have access to the backups youve stored in code artifact right now you know what services actually have access to the local repository you've set up do you think your local repository is now available to the entire world like anyone can see a local repository do you think all AWS Services now has access to your local repositories dependencies well here's the answer eventually other devop services like AWS code build abls code Pipeline and your development environments like Cloud9 they're going to need access to the packages that you store in Cloud artifact but they don't have access by default so they're going to need all of the dependencies you've stored a copy of but they don't have access by default they can't get through the door um so we need to Define an IAM policy so that later on all of these Services can use the resources that we've just um installed into our Code art effect repository um so how are we going to do that we're going to go into IAM let's visit I am in our Management console oopsy daisies let's visit am okay very nice open that in a new tab okay cool and here we're going to click on policies in the leftand navigation panel and we're going to click on create policy so now we're going to create a policy uh and as a reminder I am policies are kind of like Rule books it's kind of like saying you get access to this you get access to this you get access to this and like each policy it kind of brings down is almost like a little a little pass or a little book of like um things that you can or cannot have access to now um let's see this in action so switch to the Json tab when you get to uh the create policy page and copy this policy code that's provided to you okay we're going to copy this code and we're going to paste that straight into the code editor panel heads up if you're not feeling too comfortable with like how fast we're going through it with creating an I am policy please note that a very very in-depth explanation and a slower version of this is available in our security with awsam exercise the live demo for that is also in our YouTube channel okay so I've just pasted that into my policy editor uh panel okay and what I'm going to do next uh is I'm gonna unpack the spicy policy with you that's what I'm going to do next yeah I was always planning on doing that uh let's unpack the spicy policy this policy that we've just pasted into here you know we've just learned that we've just talked about how policies policies are rulebooks we kind of just pasted a little sheet of rules in here right now but this sheet isn't exactly quite readable you know you might be looking at this and being like uh none of this really makes sense to me so let's break it down together now at the very very top was the line that says oh dear me uh let me make sure you can actually see this okay there you go um at the very top here it was version 2012-10 -7 this is basically the version number for the Json language we're using to Define this policy um it is not the rulebook itself it is almost like saying oh by the way this policy is written in this version of Json um so not too relevant we're going to skip straight into our second line all the lines that fall under this statement bracket which uh is everything else by the way um is basically the the juicy part of our Json policy that's the finding those rules so do you see how in this square brackets we have more brackets okay we have this bracket here and we have this bracket here you know do you see like one one bracket here and a second bracket here so each bracket is one statement so this is one statement defining uh a rule that I'm going to make and then this is another statement defining another rule I'm about to make okay uh the first the first rule starts with the effect is allow so that's basically saying whatever um action I'm about to say you're allowed to do it okay the reverse of this is deny so which means if I ever write a statement that says AFF deny it means whatever action I'm about to mention you're not allowed to do it but okay in this case we're allowing it we're allowing it it's chill uh and the action that we're allowing is these okay we're basically saying whoever gets granted this policy that I'm writing they're allowed to do this they're allowed to go into code artifact and get an authorization token which we've talked about is kind of like that access path or that wristband um to give you access uh they're also allowed to get the repository endpoint which means that uh any anyone that gets this policy is now allowed to find exact URL of a code artifact repository they're also allowed to read from a repository which means anything that now gets this policy is now allowed to read or download the packages that's inside code artifact so again there's a resource that says star and star is a very very good way to just say all um so in this context it means the permissions I we've just defined they apply to all the resources in this case all the code artifact repositories it's not just one or two code artifact repositories you're now allowed to you know get authorization tokens for or get repository endpoints for it is all the repositories um in code artifact that you now have access to do these three things to okay so that was very very handy thank you so much for giving me that access pass uh the next statement is something that's a bit less relevant so we're just going to uh go through this one a bit quicker but this second statement is basically saying anyone that gets this policy also gets temporary security credentials to interact with code artifact and this is basically something that um any AWS service is going to need in order to request that authorization token in the first place you know how here we're like you're allowed to get an authorization token but to even get an authorization token you need to be allowed to do that in the first place you know what I mean you're like you need to have access to be able to ask um and in this case we're basically saying okay you now have the permission to ask if you don't give this uh if you don't include this statement literally uh anyone that gets this policy uh will be a bit it's going to be a bit redundant because they're not even given the permission to ask for an authorization token you need to give this uh you to add the statement so that they're even like allowed to ask for that authorization token I hope that was clear um and you know all we're going to do now is we're going to take a screenshot of this oh and and add this to our documentation template so let's Chuck this over now to our documentation template uh and let's put that in here you know what that is perfect the way it just snapped straight into my frame I'm very happy with this and let's just fill in the prompts right away prompt one says I also created an I am policy because do you still remember why we created this policy because other other services in my cic CD pipeline EG code build code pipeline will be needing access to the uh we'll be needing access to the dependencies to the packages dependencies stored in code artifact okay um I can be even clearer and say by default these services do not have access so they need to be granted access through an I am policy nice I'm quite happy with that um okay next up I defined my IM am policy using Json correct we use Json code to uh Define our policy this policy Will O this policy will enable um the policy holder what is it going to enable it's going to enable the policy holder to uh first things first get authorization tokens tripy says I'm watching while it works I'll definitely have to revisit this later thank you so much for being here tripy I really really appreciate it and we got your back of course come back whenever and I can't wait to see you try this project later on thank you so much this policy will Ena the policy holder to get authorization tokens I.E access to uh what's it called access a code artifact um and also the ability to fetch the packages stored in code artifacts repositories so perfect that is a pretty I'm quite happy with these um explanations of what we've just done with the IM IM policy uh so we're going to finish this off by naming our policy uh so once we've already defined what it does we actually haven't given it a name yet so let's give it a name oh I can exit out of my full screen mode like this so let's give it a name by clicking next here and pasting the policy name here uh and then for the description we're going to add it right here as well in the description box very nice and like that let's click create policy oh oh it says it failed to create because it already exists which is my bad I've or um created this policy when I was uh testing this project so let's just add a dash one for my scenario where this policy already exists oopsies um and it's all created now so that's perfect so nice work we have a working repository that can be used by other services now um because of this I am policy other services that are granted um that are granted this policy can now fetch dependencies from your code artifact repository so you will see this an action in the next project which is going to be released very very soon it should be released tomorrow um and you're going to be able to see that policy in action as well so I can't wait for you to see that in the meantime we've actually just finished the steps required for this project today so that was super fun um all you have to do next is first wrap up your documentation you know you're going to see that there's actually a few very very interesting slides that you can uh fill up to share and summarize your learnings um I can't wait to see what everyone does with this slide because it is the first time we're really using some sort of architecture diagram looking thing um to add to your um document ation template so let us know how you find it don't forget to fill in the prompts um and also another thing you can do is just make sure that you are filling in your profile photo and your full name Etc into the documentation template you know so in here in uh you can always just upload a photo straight into uh canvas or straight into this um web app that's hosting uh your documentation template right now and you can just always upload a photo straight in here so I have a photo handy so I'm going to use this photo uh and then I can drag it in here it already has my face snapped in right away and you can even double click on this and drag this up so you can be like I want more of my face to fill up that Circle okay let's just say I'm that kind of person uh and then just like that done boom this that look pretty neat uh my GitHub uh handle is Natasha all coding so I'm going to use that and my title page is all done I feel like this looks really neat I'm very impressed with this but you can even uh use this little hack to replicate um this content across the other pages of your documentation template so for example I just copy this I can even press group to group it into one big thing okay I can press copy here and then I can just press paste here oops I clicked on the wrong icon click paste here oh okay see I I I copied the wrong thing but click here press copy click on the next slide press paste okay you have this now and you can almost overlay it on top of the second Page's equivalent uh okay it's kind of like this and then you can size it down so that the circles are about the right size okay do you see me kind of slowly putting it all together you know okay do you see how my circle is now completely overlaid on top of the uh default Circle once that's done you know you can use this to say layer it send backwards or you can layer it sent it back okay so now it's behind the default ones and I'm going to delete the default ones bam it's just mine now and just like that I have completely replaced the other one um without needing to drag in a new photo type in my name again type in my GitHub repository again that was really easy um and you can now just copy this one copy it now and then the next page delete this straight away and then paste in what you've copied bam just like that it's replicated okay so replicating this is super easy um it shouldn't take longer than you know minutes all up um and if you ever get stuck ask a question in the community I'm here to help you as well um we all are here to support each other in this journey so please don't hesitate to ask a question I really truly think and entire team um really truly thinks that this is something that really helps to lift the entire Community up cool um next thing share your work so now that you have an amazing documentation template that's all about your learnings from this project you can click share and then you can click on a button a download button that can download your uh documentation as a PDF so that is a super super handy little tool because downloading as a PDF is a great way for you to share it on LinkedIn um we've implemented something new over the last week something new we've done is we've created um a link that you can click on right away to open a prefilled link ledin post ready for you to use so I've just clicked on that link here and boom do you see how this post has just been pre-filled on LinkedIn that's wild you know all you to do next is make sure that this nextwork tag is an actual nextwork tag you know you know make sure you're actually clicking here so it turns into this like bolded black thing um and that will make sure that we actually get notified um that you've posted about this documentation your documentation and we can come and support um and the next thing you do after this is you click on the plus button that says more and then you click on the add a document click on choose file and you can boom straight away pick the uh pick the PDF document you've downloaded from canva so I know I haven't downloaded my uh my what's it called my documentation yet but you know maybe we can just like use someone else's documentation as a placeholder shout out to musaba um who written a very very great uh documentation on his Amazon Lex project let's say I wrote this okay let's say I wrote this and let's say this is the documentation I want to want I want to add paste that into your document title just have any title here um click done and boom that was so quick you already have a LinkedIn post ready for you to just click Send or click post um so yeah that is how you could share it on LinkedIn in just less than five minutes as well um and you know once that's all done make sure you delete your resources we've come to the finish line now do you remember what I said at the very start delete those resources okay you don't need to delete the IM am user or the IM am policy you've created things in I am are free to stay in your account you won't get charged for keeping them uh but in your Cloud9 console please delete the environment you've set up in your easy to console delete the easy to instance and let's just do that right away now so I'm going to my Cloud9 console oh you don't see it here so let's go search for Cloud9 a thank you Eric Eric in the chat says I like the link idea very very fast I'm very glad um Eric also says sometimes when I download it it comes in a zip folder any reason why great question so the reason for that would be because you downloaded it as a JPG maybe or PNG which means you've downloaded them as images you want to switch that to downloading it as a um what's it called as a PDF so I think I should be able to give you an example of this let me just quickly uh just give anyone in the team access to this uh I'm gonna try to demonstrate that to you right away sorry just give me a second to switch gears um so you can see okay so let's say this is uh okay apologies guys I have just used the wrong settings which is my bad let's say this is you and you want to download um your documentation template after you're all done um you would just click share here okay and do you see how there's a download option okay oh there's a download button so click on download and instead of PNG which is suggested switch that away to PDF standard okay and download it and now it is an actual PDF document because if you use that no thanks if you use the uh the default option which I know just now was PNG like the suggested option it's going to download as a zip folder because it's going to be downloaded as a collection of photos instead of one document uh so let me just show you the comparison now so I'm going to open my downloads folder to show you all right do you see how I have a zip folder and I have a PDF so this PDF is what I created when I selected the PDF option okay it's everything I wrote It's a PDF and then when I stayed on the suggested one when I stayed on the suggested option this one when I stayed on the PNG option it became a zip folder with all of the documentation pages as individual photos we don't really need that we just need it to be one single document so make sure to change it to PDF all right okay we're going to make sure we actually delete our Cloud9 console uh so let's click into Cloud9 and let's delete the environment so I'm going to click on delete type delete in here and next there's also a step that says in your easy2 console delete the easy2 to instance that your NEX IDs has created to run the environment I know we didn't in this project literally manually create an ec2 instance but sometimes resources gets created as a byproduct of other things we create in this scenario an ec2 instance has been created as a byproduct of wanting to run our Cloud9 IDE so let's make sure we delete that to so let's visit ec2 let's take a trip to the ec2 console and let's make sure that under instances these two are both now deleted so let's go to instance State and click on terminate instance and click on that terminate button and just like that our easy to instances will be going to sleep so it's going to be done all done uh in our code commit console my goodness we do have a few consoles to visit today don't we so in our code commit console so let's delete the git repository that's hosting all of our project apps code so let's click on the git repository I created uh oh let's not create a new one my bad let's click on the one I've created and go delete repository type delete in the field to make sure it's deleted okay and in my code artifact console pH almost at the Finish Line everyone let's delete the repositories so we're going to delete the repository that's holding all of those dependencies um for our project so first we're just going to delete the local local one oh I swear there's something about orange buttons that you I just I just get drawn to when really I should be C clicking the delete button all right so type delete in the field to confirm your deletion um and same thing with Maven Central store which is your public Upstream repository we don't need that anymore either we don't need our local hardware store anymore we've said goodbye to building tonight um and I think that's it that's a wrap that was part three of this devops and AWS series done congratulations next up we need to gather all of the necessary pieces to build our Java web application resource which is called a war file which is where the app really comes together and becomes this one bundled file that a server can use to host again if that's sound a little bit technical we're going to go go through that bit by bit in the next project um but yeah this next project is where the next service in the cicd pipeline C code build comes into play in the meantime today you've learned how to set up a code artifact domain and repository that was our local repository we set up the Upstream repository um we got to meet the maven Central repository we connected Cloud9 our Cloud9 IDE or we connected our Java web app to code artifact through Cloud9 so that was awesome we also compiled our project with code artifact which means we compiled it which means we translated the programming language or the code that we've used to write up our um project app into machine code and we've also implemented that IM am policy um again you know cool thing all of these things that we've learned we've documented you know we have a copy of all of these learnings in our own back pocket as well so that's awesome so good on you for create uh for getting to the Finish Line to another um project with me today thank you so much for being here um and a special shout out to everyone that's in the nexer community that's also engaging in the chat what what a great pleasure it is to be doing these projects with you you know shout out to Ruben thank you Rio thank you abas thank you udak thank you Gabrielle thank you Lawrence thank you Eric um I can't wait to see you in the next one oh Gabrielle thank you so much Gabriel says you are amazing that setting that positive energy right back to you I can't wait to see you in the next project let's catch up in the community in the meantime okay take care stay well uh and I hope you have a great weekend all right bye everyone see you thank you so much for being here bye