Thursday, March 23, 2023

Amazon EC2 Instance Types

Amazon Elastic Compute Cloud (EC2) offers a wide range of instance types to support various workloads and use cases.

Each instance type is designed to provide a specific combination of CPU, memory, storage, and network performance.

The following are some of the instance types offered by AWS:

  1. General Purpose: These instance types are ideal for small to medium-sized databases, web servers, and development environments. Examples include the T4g, T3, T2, M6g, M5, M4, A1, and A2 instance families.

  2. Compute-Optimized: These instance types are designed for compute-intensive workloads that require high CPU performance. Examples include the C6g, C5, C4, and CC2 instance families.

  3. Memory-Optimized: These instance types are ideal for workloads that require high memory capacity, such as in-memory databases and big data analytics. Examples include the R6g, R5, R4, X1e, X1, and z1d instance families.

  4. Storage-Optimized: These instance types are designed for workloads that require high storage capacity and high I/O performance, such as NoSQL databases, data warehousing, and log processing. Examples include the I3, D2, H1, and G3 instance families.

  5. GPU-Instances: These instance types are designed for workloads that require high-performance graphics processing units (GPUs) for deep learning, scientific simulations, and video encoding. Examples include the P4, P3, G4, G3, and Inf1 instance families.

  6. FPGA-Instances: These instance types are designed for workloads that require customizable hardware acceleration for specialized workloads. Examples include the F1 instance family.

  7. Arm-based Instances: These instance types are based on Arm processors and are optimized for workloads that require high performance at a lower cost. Examples include the Graviton2-based instances.

Each instance type has its own unique characteristics and pricing model, so it is important to choose the instance type that best meets your workload requirements and budget.

AWS Instance tenancy- Reserved and Spot instances

AWS Instance tenancy refers to how an Amazon Elastic Compute Cloud (EC2) instance is placed on the underlying physical host, and whether it is dedicated solely to the customer or shared with other customers.

Reserved instances are a way to save money on AWS EC2 instances by committing to a certain usage level over a one- or three-year term.

With reserved instances, customers can choose between three tenancy options:

  1. Dedicated Instance: A physical server that is dedicated to a single customer.

  2. Dedicated Host: An entire physical server that is dedicated to a single customer.

  3. Default tenancy: An EC2 instance that is shared with other customers on the same physical host.

Spot instances, on the other hand, are a way to purchase spare computing capacity at a discounted rate.

With spot instances, customers bid on unused EC2 capacity, and if their bid is above the current market price, they can use that capacity until the spot price exceeds their bid or they terminate the instance.

Spot instances are always launched as default tenancy, which means they can share the same physical host with other customers' instances.

In summary, the tenancy options for AWS EC2 reserved instances include Dedicated Instance, Dedicated Host, and Default tenancy, while spot instances are always launched as Default tenancy.

steps to create an AWS EFS volume and mounting the EFS volume to two instances.

 Here are the steps to create an AWS EFS volume and mount it to two instances:

  1. Log in to your AWS console and navigate to the EFS service.

  2. Click on the "Create file system" button.

  3. Select the appropriate VPC and subnet for your EFS volume.

  4. Choose a performance mode for your EFS volume. You can select either "general purpose" or "max I/O."

  5. Set the throughput mode for your EFS volume. You can select either "bursting" or "provisioned."

  6. Set the encryption for your EFS volume. You can choose to encrypt your data at rest or not.

  7. Configure the network settings for your EFS volume. You can choose to allow access from specific IP addresses or allow access from anywhere.

  8. Click on the "Create file system" button to create your EFS volume.

  9. After the EFS volume is created, navigate to the "Access Points" tab and click on the "Create Access Point" button.

  10. Set the name and permissions for your access point.

  11. Click on the "Create Access Point" button to create your access point.

  12. Navigate to the EC2 service and launch two instances in the same VPC and subnet as your EFS volume.

  13. SSH into each instance and run the following command to install the EFS mount helper:

sudo yum install -y amazon-efs-utils
  1. Create a mount point directory on each instance. For example, you can use the following command:
bash
sudo mkdir /mnt/efs
  1. Mount the EFS volume to each instance using the following command:
javascript
sudo mount -t efs -o tls fs-xxxxxxxx:/ /mnt/efs

Note: replace fs-xxxxxxxx with the file system ID of your EFS volume.

  1. Verify that the EFS volume is mounted on each instance by running the following command:
bash
df -h

You should see the EFS volume listed as a mounted filesystem.

Now, you have successfully created an AWS EFS volume and mounted it to two instances.

The EFS volume can be accessed from both instances, and any changes made on one instance will be visible on the other instance as well.

Time Intelligence Functions in Power BI: A Comprehensive Guide

Time intelligence is one of the most powerful features of Power BI, enabling users to analyze data over time periods and extract meaningful ...