Adi CC Ass No 1
Adi CC Ass No 1
Objective: To launch a virtual machine on Amazon AWS EC2 and perform basic settings for
configuration and use.
Theory: Amazon Elastic Compute Cloud (EC2) is a web service that provides resizable
compute capacity in the cloud. It enables users to launch virtual servers, known as instances, to
run applications on the cloud infrastructure. EC2 is cost-effective and scalable, making it
suitable for both large-scale enterprises and individual developers.
Some key features of Amazon EC2:
1. Elasticity:
○ One of the defining features of cloud computing, elasticity allows you to
automatically or manually scale compute capacity up or down based on
demand.
○ When demand increases, EC2 can launch additional instances or scale vertically
(adding resources to an instance), ensuring high availability and performance.
○ During periods of low demand, you can reduce the number of running
instances, thus minimizing costs. This flexibility makes it ideal for applications
with fluctuating workloads, like websites, online retail, or large-scale
computational tasks.
2. Pay-as-you-go Pricing:
○ EC2 follows a pay-as-you-go pricing model, meaning you are only billed for the
compute capacity you use. If an instance is idle or shut down, you don't incur
charges for CPU resources, which reduces overall operational costs.
○ EC2 offers multiple pricing options:
■ On-Demand Instances: Pay for compute capacity by the hour or second
(for Linux) with no long-term commitment.
■ Reserved Instances: Offer a discount (up to 75%) compared to
On-Demand pricing for users who can commit to using EC2 over a period
(1 or 3 years).
■ Spot Instances: Allow you to bid on spare EC2 capacity at steep
discounts, up to 90% cheaper than On-Demand instances.
○ This model is perfect for businesses that need cost efficiency without
compromising on the flexibility to scale.
3. Preconfigured Templates (Amazon Machine Images):
○ EC2 instances are launched from Amazon Machine Images (AMI), which are
pre-configured templates containing the necessary software (OS, libraries, and
applications) to start an instance.
○ AMIs enable users to quickly launch instances tailored to their specific needs,
without having to manually set up operating systems or other basic
configurations.
○ AWS offers a variety of pre-configured AMIs, including those with Linux, Ubuntu,
Red Hat, Windows, and even custom configurations for specialized applications
like machine learning.
○ Users can also create and save their custom AMIs, ensuring that all instances
they launch will have the exact setup required for their use cases.
4. Various Instance Types:
○ EC2 provides a wide selection of instance types, each optimized for different
kinds of workloads. This helps users select the best-suited resources for their
applications, balancing performance and cost. Some of the key instance types
include:
■ General Purpose Instances: (e.g., t2.micro, t3.medium) Best suited for
applications with a balance of compute, memory, and network resources,
such as web servers or development environments.
■ Compute-Optimized Instances: (e.g., c5, c6i) Designed for
compute-intensive tasks such as high-performance computing (HPC),
machine learning inference, and gaming servers.
■ Memory-Optimized Instances: (e.g., r5, x1) Ideal for memory-intensive
workloads like large in-memory databases (e.g., SAP HANA), big data
analytics, and real-time data processing.
■ Storage-Optimized Instances: (e.g., i3, d2) Optimized for high read/write
operations with large datasets, suitable for applications like distributed file
systems and data warehousing.
■ GPU Instances: (e.g., p3, g4dn) Used for tasks requiring graphical
processing power, such as deep learning, AI training, video rendering, or
3D modeling.
○ These instance types offer different combinations of CPU, memory, storage, and
networking capacity, allowing users to optimize performance based on their
specific workload requirements.
5. Security:
○ Amazon EC2 integrates with AWS Identity and Access Management (IAM) to
ensure secure access to instances. With IAM, users can control who has
permission to launch and manage instances, assign roles to instances for secure
access to other AWS resources, and more.
○ Security Groups act as virtual firewalls for your instances, controlling inbound
and outbound traffic to ensure your applications are protected.
○ Key pairs are used for secure login over SSH or RDP, ensuring that only
authorized users can access the virtual machine.
6. Reliability and Availability:
○ EC2 instances run on the robust AWS infrastructure, designed to provide high
reliability and availability. With features like Auto Scaling, users can maintain
application availability by automatically adjusting capacity to ensure performance
during high traffic.
○ AWS's global availability zones and regions provide geographical redundancy,
ensuring that even if one zone goes down, your instances can remain operational
in another zone.
7. Automation and Management:
○ EC2 instances can be managed easily with AWS CloudFormation, which allows
users to automate the creation and configuration of EC2 resources.
○ Auto Scaling Groups and Elastic Load Balancing (ELB) work together to
distribute traffic across multiple instances, maintain performance, and reduce
downtime.
○ Amazon CloudWatch allows users to monitor the health and performance of
their instances, set up alarms, and take action automatically based on predefined
thresholds.
8. Integration with Other AWS Services:
○ EC2 integrates seamlessly with various AWS services, such as S3 for storage,
RDS for managed databases, Lambda for serverless computing, and VPC
for networking.
○ These integrations make EC2 instances more flexible and useful for a wide range
of applications, including web hosting, big data analysis, machine learning, IoT,
and more
Execution Steps:
Screenshot: