Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give you the flexibility to choose the appropriate mix of resources for your applications. Each instance type includes one or more instance sizes, allowing you to scale your resources to the requirements of your target workload.
The instance will be charged per hour with different rates based on the type of instance chosen. AWS provides multiple instance types for the respective business needs of the user. Thus, you can rent an instance based on your own CPU and memory requirements and use it as long as you want. You can terminate the instance when it’s no more used and save on costs. This is the most striking advantage of an on-demand instance- you can drastically save on your CAPEX.
Here is the full dedicated video-based upon "How to Create Amazon EC2 Instance"👇👇
Steps to Create Amazon EC2 Instance
1. In EC2 go to the Instances
2. And after that Click on Launch the Instance.
3. Choose the Machine Image (AMI) you want.
4. Choose the Instance Type you want.
5. Configure the Instance Details
6. Add Storage
7. Add tags
8. Configure Security Group
9. Review and Launch, Here you can see the Detail of your Instance.
10. If you are done with the Review, Now you can Simply launce the Instance
HashiCorp Terraform is an open-source infrastructure as code (IaC) software tool that allows DevOps engineers to programmatically provision the physical resources an application requires to run. Infrastructure as code is an IT practice that manages an application's underlying IT infrastructure through programming.
What is AWS Automation?
Automation, a capability of AWS Systems Manager, simplifies common maintenance and deployment tasks of Amazon Elastic Compute Cloud (Amazon EC2) instances and other AWS resources. ... Build automations to configure and manage instances and AWS resources.
Here is a full tutorial video (Concept + Demo) based on "How we can do AWS Automation using Terraform"👇👇
Resource: aws_launch_configuration
Provides a resource to create a new launch configuration, used for autoscaling groups.
Launch Configurations cannot be updated after creation with the Amazon Web Service API. In order to update a Launch Configuration, Terraform will destroy the existing resource and create a replacement. In order to effectively use a Launch Configuration resource with an AutoScaling Group resource, it's recommended to specify create_before_destroy in a lifecycle block. Either omit the Launch Configuration name attribute, or specify a partial name with name_prefix. Example:
data "aws_ami""ubuntu"{most_recent=truefilter{name="name"values=["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]}filter{name="virtualization-type"values=["hvm"]}owners=["099720109477"]# Canonical}resource "aws_launch_configuration""as_conf"{name_prefix="terraform-lc-example-"image_id= data.aws_ami.ubuntu.id
instance_type="t2.micro"lifecycle{create_before_destroy=true}}resource "aws_autoscaling_group""bar"{name="terraform-asg-example"launch_configuration= aws_launch_configuration.as_conf.name
min_size=1max_size=2lifecycle{create_before_destroy=true}}
With this setup Terraform generates a unique name for your Launch Configuration and can then update the AutoScaling Group without conflict before destroying the previous Launch Configuration.
AWS (Amazon Web Services) is a comprehensive, evolving cloud computing platform provided by Amazon that includes a mixture of infrastructure as a service, platform as a service, and packaged software as a service offering. AWS services can offer an organization tools such as compute power, database storage, and content delivery services.
What is AWS EC2?
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment.
Here is a fully dedicated video on AWS Interview Question and Answers
What are the features of AWS EC2 Instances?
Amazon EC2 provides the ability to place instances in multiple locations. Amazon EC2 locations are composed of Regions and Availability Zones. Availability Zones are distinct locations that are engineered to be insulated from failures in other Availability Zones and provide inexpensive, low latency network connectivity to other Availability Zones in the same region. By launching instances in separate Availability Zones, you can protect your applications from the failure of a single location
You only pay for what you use. It takes the cost of unused minutes and seconds in an hour off of the bill, so you can focus on improving your applications instead of maximizing usage to the hour.
Different Amazon EC2 workloads can have vastly different storage requirements. Beyond the built-in instance storage, we also offer Amazon Elastic Block Store (Amazon EBS) and Amazon Elastic File System (Amazon EFS) to suit other cloud storage workload requirements. Amazon EBS provides persistent, highly available, consistent, low-latency block storage volumes for use with Amazon EC2 instances, while Amazon EFS provides simple, scalable, persistent, fully managed cloud file storage for shared access.
Enhanced Networking enables you to get significantly higher packet per second (PPS) performance, lower network jitter, and lower latencies. This feature uses a network virtualization stack that provides higher I/O performance and lowers CPU utilization compared to traditional implementations.