launch_a_simple_aws_ec2_instance
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| launch_a_simple_aws_ec2_instance [2017/08/04 16:35] – [Instance AMI] walkeradmin | launch_a_simple_aws_ec2_instance [2017/08/05 09:00] (current) – removed walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Launch a Simple AWS EC2 Instance ====== | ||
| - | <color darkorange> | ||
| - | \\ | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ===== Introduction ===== | ||
| - | \\ | ||
| - | By Simple I mean the very basic EC2 instance that you can have, a single EC2 Instance with basic storage and a DHCP IP Address (so no Elastic IP), and no S3 Buckets etc. | ||
| - | \\ | ||
| - | \\ | ||
| - | The idea is that using a free AWS account, you should be able to play with the information on this page and not incur any costs (<color # | ||
| - | \\ | ||
| - | \\ | ||
| - | If you have not created an EC2 Instance manually, then you possibly will not understand this process, so I suggest you check this page out first [[creating_an_amazon_aws_ec2_instance|Creating an Amazon AWS EC2 Instance]] | ||
| - | |||
| - | ---- | ||
| - | ==== The Script ==== | ||
| - | \\ | ||
| - | Below is the script we will be using, I want to discuss a few of the elements first so that we understand a little of what changes to the script you might need to make to suit your purposes. (Ignore the line numbers) | ||
| - | \\ | ||
| - | \\ | ||
| - | <sxh> | ||
| - | provider " | ||
| - | access_key = " | ||
| - | secret_key = " | ||
| - | region = " | ||
| - | } | ||
| - | |||
| - | resource " | ||
| - | ami = " | ||
| - | instance_type = " | ||
| - | key_name = " | ||
| - | security_groups= [" | ||
| - | tags { | ||
| - | Name = " | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Access Key ==== | ||
| - | This is not the same as your key pair, if you have created an EC2 instance manually, you will have created a key pair for SSH access, but the credentials here are not the same. | ||
| - | \\ | ||
| - | <sxh> | ||
| - | provider " | ||
| - | access_key = " | ||
| - | secret_key = " | ||
| - | |||
| - | </ | ||
| - | \\ | ||
| - | We will look at how to create the ' | ||
| - | \\ | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== Region | ||
| - | This really caught me out to begin with. If I look at the region I am running my instance in then it is reported as <color # | ||
| - | \\ | ||
| - | <sxh> | ||
| - | region = " | ||
| - | </ | ||
| - | \\ | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ==== Instance AMI ==== | ||
| - | The next section is where we setup our AMI (Amazon Machine Image) The AMI is what OS you wish to use (Linux, Winodws etc) and if Linux what version of Linux (Red Had, Debian etc). | ||
| - | \\ | ||
| - | <sxh> | ||
| - | ami = " | ||
| - | </ | ||
| - | \\ | ||
| - | In the above example we have specified ami = " | ||
| - | \\ | ||
| - | \\ | ||
| - | {{ : | ||
| - | \\ | ||
| - | Please be aware that AMI names vary across AZ availability zones. So the AMI name of Red Hat will differ between London and US. | ||
| - | \\ | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
| - | ==== Instance Type ==== | ||
| - | The Instance Type is really the type of Virtual Server. This dictates how many vCPUs you have, the amount of RAM etc. | ||
| - | \\ | ||
| - | <sxh> | ||
| - | instance_type = " | ||
| - | </ | ||
| - | \\ | ||
| - | In this example we are using the t2.micro, as this falls in to the free tier category (as long as you are still in your free tier period.) | ||
| - | \\ | ||
| - | |||
| - | ---- | ||
launch_a_simple_aws_ec2_instance.1501864531.txt.gz · Last modified: (external edit)
