In this post we will continue with creating our instance. Now it is time to configure our instance details.
In first definition we have to tell how many instance we will create. If we want to request spot instance we have to define it also. Request spot instances are spare Amazon EC2 instances and you decide how much you want to pay for it.
The Spot Price is set by Amazon EC2 and it changes in real-time according to Spot Instances supply and demand. If your bid is higher than spot price your instance will run. If spot price gets higher than your id your spot instance may be interrupted. For our example we won’t select spot instance.
In network definition we can choose default or create vpc. I will write a detailed post about vpc later , so , for now we continue with default network. In subnet section you can select default availability zone or you can prefer a different zone like eu-west-1a. Availability zones are isolated location in each region and regions are separate geographic areas. For example for Ireland / EU ) region there are 3 availability zones. If you want your instance reachable from the internet , Automatically assign a public IP address to your instances must be selected ( by default it is selected ). I have to tell that public ip is not a permanent ip and if you stop or terminate your instance this ip is no longer available. So if you want a permanent ip , you have to use Elastic Ip address (EIP).
If you defined IAM roles ( another post will be about this also ) you can select which IAM role to assign to this instance. Shutdown behaviour is selecting what will happen to your instance when you stop it. There are two options ; terminate, deleting and shutting down. If you want to protect your instance against accidental termination you should select enable termination protection. In the next section you can select Cloudwatch basic ( default selected and data is available automatically in 5-minute periods at no charge ) or detailed monitoring. And in tenancy part you can change either using shared or dedicated hardware tenancy. AS you so both detailed Cloudwatch and dedicated tenancy will apply additional charges.
In advanced details you can select different kernel and Ram id. And finally in user data section you can specify user data to configure an instance or run a configuration script during launch as bootstrap script in my saltstack installation post. Also you can see an example below.
#!/bin/bash # Install saltstack add-apt-repository ppa:saltstack/salt -y apt-get update -y apt-get install salt-minion -y apt-get install salt-master -y apt-get upgrade -y # Set salt master location and start minion sed -i 's/#master: salt/master: [salt_master_fqdn]/' /etc/salt/minion salt-minion -d
For details about example script refer to this link.
In the next post I will tell about storage options, tagging and security group configuring.