We have Learnt about Pricing Models of EC2, and the types of EC2 instances that best suit your business needs. So now you might be good to go with the instance setup, so there are few more things to remember while you are initialization an EC2 instance, lets see in detail about each of them.
9 Keys Decision that we should make when Launching an EC2 Instance
The decision is more like the steps which we need to choose according to your needs, which might be useful for future purposes. This Steps or selections affect the overall working of the EC2 instance, like in which network it should be placed, what permission does the instance have, what the storage and memory of the instance, what kind of Operating system you want to run on the instance, etc. So let's see in detail about each of them
1. Which AMI to launch the EC2 From
AMI or Amazon Machine Images are the Pre-build Images of the Operating system they usually have all the required software and tools installed in them, we just need to select them and when the instances boot up all the configurations of the AMI will be installed. We can find AMI in 4 ways.
- Quick Start AMI which is the most commonly used AMI for basic purposes they is made by AWS, Many Operating systems like Windows, Linux, Red-hat OS are available here.
- My AMIs are the AMI that is created by us by modifying the existing ones.
- AWS Marketplace AMI's are the third way in which we can find AMI's they all are made by AWS and literally you can find AMI's for any need from business to commercial and also for development and testing.
- Community AMI's are the AMI's developed by the open-source community, They are not verified by the AWS, So we should be careful before using them.
2. What Instance Type to Choose
Instance Type means The types of CPU to use, amount of memory needed, networking capacity and configurations, and many more. Choosing the Right instance is really crucial, if your workload is high and you are choosing some instance with less memory then it's a problem, or if you have less workload and using a large instance there will be a lot of cost issues. So we need to be careful before choosing the right instance type. Let's see the Basic Instance Types.
- General Purpose Instances:(a1,m4,m5,t2,t3) are the instance models names that come under general purpose they are mostly used for common workloads and which do not require additional features and limited resources.
- Compute Optimized: (c4,c5) This instance provide high performance because they are optimized to give high throughput and performance, they usually have more memory, if your workload needs lots of computations then you can go for this type.
- Memory-Optimized: (r4, r5, x1,z1) These types of instances are used when a lot of data needs to be bought into main memory for calculations like big data and machine learning, etc.
- Storage Optimized: (f1, g3,p2, p3) These are the instance types with lots of storage flexibilities, when you have a large amount of data or like a database, you can go with this type.
- Accelerated Computing: (d1, h1, i3) The instance with the highest computational powers which are used for video editing, game streaming, or high-end textures editing.
3. Networking Settings
When we are launching an Instance we need to keep them in the subnet or a Virtual Private Network, so they can communicate with other devices. We should mention the VPC in which we want the instance to be, if we don't mention anything by default it will be kept in a default VPC. In a Default VPC, it will be a public IP address by default. We can also override the settings after configuring the instance.
4. Choosing the IAM Role
IAM roles specify the types of users who can use, What types of services we can run on the instance whether it is a TCP service or a UDP service. EC2 instances often make calls to other APIs of the AWS, then it is useful to give the IAM roles to them, or else we need to store the credentials and details in the instance which is not a good way to manage an instance.
5. User data And Automated Scripts
Automations are very important in cloud computing, If there is work that has to be done many times then its better to automate the process with simple codes, for example, we want to install Apache server and Python whenever we create an instance we can add user data to the instance it's like adding a code which runs in the time of Boot. We should remember that it only runs one time that too in the time of the first booting of the Instance.
6. Storage Options of EC2
Storage options mean the things, where the main OS or root folder should be, What type of disc we should use (SSD or HDD), or should be the data deleted if the instance is terminated. We can use additional AWS Services like AWS Elastic Block Storage which can be attached to the instance as a storage device and the data will be saved if the instance is terminated.
7. Tagging for Future Use
Tags are useful in identifying the instances. They basically are in the form of key-value pair we can name the instances with any name we want, these tags are helpful in the time of assigning networking settings, monitoring the costs and runtime of instances, and many more.
8. Placing them in a Security Group
A Security Group is like a set of rules which the instance should follow like the inbound and outbound traffic from the instance, which ports should be open, what services should run on the instance. We should remember that by default the outbound rule of the security group allows all outbound traffic. And all inbound traffic is blocked
9. Adding a key-pair for Security
Key-pair is used when we are logging into the instance its a like a password to the system. If we don't have a key pair we can create one, from the time of making an instance. Then we need to login into the system using SSH for Linux or RPC in windows, there are also other ways in which we can log in to the system.
Tags:
Cloud_Computing