Day 40 AWS EC2 Automation ☁

Day 40 AWS EC2 Automation ☁

Introduction to Amazon Ec2 :

  • Amazon Elastic Compute Cloud (Amazon EC2) is a web service offered by Amazon Web Services (AWS) that provides resizable compute capacity in the cloud.

  • EC2 allows users to launch and manage virtual machines, known as instances, on the AWS cloud infrastructure.

  • Amazon Elastic Compute Cloud (Amazon EC2) offers the broadest and deepest compute platform, with over 700 instances and a choice of the latest processor, storage, networking, operating system, and purchase model to help you best match the needs of your workload.

Features of ec2:

  1. Instances: These are virtual machines that you can launch in the AWS cloud. You can choose from various instance types, each with different computing resources like CPU, memory, and GPU capabilities.

  2. Amazon Machine Images (AMIs): An AMI is a pre-configured template that contains the necessary information to launch an instance. You can choose from a wide variety of AMIs, including ones provided by AWS or custom ones you create.

  3. Instance Types: EC2 offers a wide range of instance types optimized for various use cases, such as general-purpose, compute-optimized, memory-optimized, and GPU instances. You can choose the one that best suits your application's requirements.

  4. Security Groups: These act as virtual firewalls for your instances. You can control inbound and outbound traffic by configuring security group rules.

  5. Key Pairs: EC2 instances can be accessed using SSH keys or Windows passwords, depending on the operating system. Key pairs are used for secure access to instances.

  6. Elastic IP Addresses: Elastic IP addresses are static, public IPv4 addresses that you can allocate to your EC2 instances. They allow you to have a consistent IP address even if you stop and start your instances.

  7. Elastic Block Store (EBS): EBS provides scalable and high-performance block storage that can be attached to EC2 instances. It is commonly used to store data and can be used for boot volumes as well.

  8. Elastic Load Balancing: You can use Elastic Load Balancing to distribute incoming traffic across multiple EC2 instances, ensuring high availability and fault tolerance for your applications.

  9. Auto Scaling: Auto Scaling allows you to automatically adjust the number of EC2 instances in response to changing traffic patterns, helping your application maintain performance and availability.

  10. Virtual Private Cloud (VPC): EC2 instances are launched within a VPC, which allows you to define a network environment, including subnets, route tables, and security settings.

  11. Regions and Availability Zones: AWS provides EC2 in multiple geographical regions and Availability Zones. You can choose the region and Availability Zone where you want to launch your instances to meet latency and redundancy requirements.

  12. Instance Storage: Some EC2 instance types come with instance storage, which is temporary storage that is lost when the instance is stopped or terminated. EBS volumes are recommended for data that needs to be retained.

Instance Types:

Amazon EC2 offers a wide variety of instance types, each optimized for different use cases. These instance types differ in terms of CPU, memory, storage, and network capabilities. As of my knowledge cutoff date in January 2022, here are some of the common EC2 instance types:

  1. General Purpose Instances:

    • t2 (e.g., t2.micro, t2.small): Burstable performance instances suitable for low to moderate workloads.
  2. Compute Optimized Instances:

    • c5 (e.g., c5.large, c5.xlarge): Designed for compute-intensive workloads such as data processing, scientific modeling, and batch processing.
  3. Memory Optimized Instances:

    • r5 (e.g., r5.large, r5.xlarge): Optimized for memory-intensive applications like in-memory databases, real-time big data analytics, and content caching.
  4. Accelerated Computing Instances:

    • g4 (e.g., g4dn.xlarge, g4dn.12xlarge): Equipped with GPUs for graphics-intensive applications and machine learning workloads.
  5. Storage Optimized Instances:

    • i3 (e.g., i3.large, i3.xlarge): Designed for high-performance storage, ideal for database workloads, NoSQL databases, and big data processing.

What is AMI in AWS?

In Amazon Web Services (AWS), an Amazon Machine Image (AMI) is a pre-configured virtual machine image that serves as a template for creating new instances (virtual machines) in Amazon Elastic Compute Cloud (EC2).

AMIs include the operating system, application server, and applications needed to launch an EC2 instance.

They are essentially snapshots of an EC2 instance that can be used to replicate that instance quickly and easily.