Now that we have our environment set up, we are finally ready to launch our first EC2 instance. There are a couple of ways to do that. Since we just installed and configured awscli
and we want to see effective ways of managing infrastructures, we will demonstrate how to do this using the CLI.
Launching a virtual server requires having a certain amount of information ahead of time. We will use the aws ec2 run-instances
command, but we need to supply it with the following:
- An AMI ID
- An instance type
- A security group
- An SSH key-pair
An AMI is a package that contains, among other things, the root file system with the operating system (for example, Linux, UNIX, or Windows) as well as additional software required to start up the system. To find the proper AMI, we will use the aws ec2 describe-images
command. By default, the describe-images
command will list all available public AMIs, which is way over 3 million by now. To get the best out of...