Registering Instances with Systems Manager

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi I'm Taylor with AWS in the last video we showed you how to set up the I am roles needed by Systems Manager in this video we'll show you a few common scenarios for registering your instances with Systems Manager as we mentioned earlier to enroll an instance under systems manager it must have an SSM role attached to it and must also have the SSM agent installed once both of these items are completed an instance is considered a managed instance there are three methods to create a managed instance let's start off with a first one which is launching a new ec2 instance as a managed instance so I'm going to jump back into the console here and I'm in the ec2 console to be specific and I'm going to show you how to launch an instance as a management instance I'm going to start by clicking on launch instance and I'm gonna select the Amazon Linux AMI and I'll go with the default instance type and I'm gonna go click Next configure instance details now remember I need to select the role that we created earlier to manage the instance and that was called my managed instance role for SSM so now I'm launching the instance with the required role now one thing to note for linux ami is is that they do not have the SSM agent bundled with them what we can do is we can use user data to install that agent at launch alternately if I were launching a Windows AMI I wouldn't need to use user data because the agent is bundled with the image so it'll take a few minutes for our instance to complete launching so we're gonna skip ahead and look at what a launched instance looks like so we've launched a new instance that also happens to be a managed instance let's see what we can do with it so I'm looking at the instances view and our new instance is called demo launched with SSM I'm gonna scroll down on the Left nav and I'm also going to go to the managed instances view and again this represents all instances that I've decided to register with Systems Manager so now that we have a new instance here let's demonstrate running a command against it again we have seven different services within Systems Manager and one of them is called run command which supports remote command execution at scale so here I'm gonna run a command and in this case here I'm going to choose from the command documents I have I'm going to select run shell script and then I'm going to select the target here the target is going to be the instance I just launched and I'm gonna enter a simple Linux command alright and then I'm gonna go to click run here's my command ID and I can also browse the output well now we can see all the items in the folder in which the command was run this is just one example of the many services within Systems Manager so be sure to check out our other videos including those on state manager patch manager parameter store inventory maintenance windows and of course run command for our next scenario we'll show you how to configure an existing instance as a managed instance this scenario is applicable when you have existing long-running Windows or Linux instances that you'd like to enroll under Systems Manager in this example you're still going to need the same two ingredients an SSM role and an SSM agent let's look at how you configure an existing Linux agent for useless Systems Manager so I'm going to start off by connecting to my instance via SSH and I'm going to go ahead and paste in a command here and you can see now that I've connected to my Linux instance and what I'm gonna do is install yes as I'm agent so I've got all the commands laid out up above the first thing I'm going to do is I'm going to make a temporary directory and I've made it and then I'm gonna change to that directory great now I'm going to download the agent itself and it's downloaded now I'm going to install the agent lastly I'm going to confirm that the agents running and there it is great so I've installed the agent on my instance remember the second ingredients were going to need is we're going to need to attach a role to the instance so I'm gonna run it back up to instances alright so here's my instance called demo need to install agent and attach SSM roll so I've installed the agent and the next thing for me to do is attach the role I can right click on the instance and then I can go down and I can say attach I am role and I'm gonna go select the role that we created earlier and that's called my managed instance role for SSM and I'm going to attach that role to my existing instance now that I've attached the role and installed the agent will see this instance also appear in the managed instances U and here it is so let's move on to our third scenario which is configuring an on-premises server as a managed instance to setup on-premises servers as managed instances you need to create a managed instance activation after you complete the activation you'll receive an activation code an ID these credentials function like in Amazon ec2 access ID and secret key and provide secure access to the Systems Manager service from your instance let's set up an activation using the console I'm gonna get navigate down in the left nav all the way down to activations and I'm going to click create activation and I'm gonna come up with a name I'm going to call this my as a demo activation and I'll set my instance limit to 50 and I will use is an existing I am role name I'm going to use the I am role we created earlier today and I'm going to set up an expiration date for this activation now an important thing to note about the expiration date is that it only applies to the length at which the credentials are valid for it doesn't mean that your instances will no longer be registered with the systems manager service after the expiration date I'm going to click create activation and it's going to generate an ID and a code and we're going to want to put those in a safe place as we'll use them in the next step when we activate and on now we've created an activation which we'll use to register our on-premises instances as managed instances remember you're going to want to go ahead and copy the activation code and activation key as you'll need them as part of the activation process all right so the process for activating an on-premises instance is quite similar to that for activating an existing instance with only one big difference and that comes down to this command right here where we actually go through the registration step so just as we showed before we've got a make directory command change directory download the agent and install the agent this would all be done via SSH on your on-premises instance the main difference here is that we would stop the agent and then register the agent using the code and the ID that we just generated previously and of course we're going to go ahead and state the region as well once we've completed this step we can restart the agent and then your on-premises instance will become a managed instance alright so we've shown you how to create a managed instance by launching a new instance by creating a managed instance from an existing instance and also by creating a managed instance from an on-premises instance thanks for watching [Music]
Info
Channel: Amazon Web Services
Views: 29,765
Rating: undefined out of 5
Keywords: AWS, Amazon Web Services, Cloud, cloud computing, AWS Cloud, EC2 Systems Manager, SSM, AWS Systems Manager, EC2 Managed Instance, Setting up EC2 Systems Manager
Id: DQ619NSwoGg
Channel Id: undefined
Length: 8min 40sec (520 seconds)
Published: Fri Sep 22 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.