AWS-Day1-Assignment
What is AWS? When was AWS started and who owns it?
Ans: Amazon Web Services, Inc. is a subsidiary of Amazon that provides on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered, pay-as-you-go basis. Clients will often use this in combination with autoscaling.
AWS was started in March 2006. It is a subsidiary of Amazon.
What are some of the AWS services? Describe any five of them.
Ans:
1. AWS EC2 – Elastic Compute Cloud
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable computing capacity in the cloud. Amazon EC2’s simple web service interface allows you to obtain and configure capacity quickly and with minimum effort.
EC2 provides a set of predefined instance profiles, or virtual server definitions, to create virtual machines. You can choose your VM configurations from any of the predefined instance types. VM instances can be memory-optimized, compute-optimized, or storage-optimized.
2. AWS RDS – Relational Database Service
Almost all applications deployed in AWS will need access to a database. This is where AWS’ Relational Database Service (RDS) fits in. RDS is a managed service from AWS using which you can set up, operate and scale a relational database in the cloud easily. As with EC2, Amazon RDS is available as several predefined database instance types – optimized for memory, performance or I/O. You can also pick the database engine of your choice from the six supported technologies including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and Microsoft SQL Server. One of the key advantages of RDS is that the managed service automates time-consuming administration tasks such as hardware provisioning, database setup, patching and backups.
3. AWS Lambda
AWS Lambda is an event-driven, serverless computing service that lets you run code without provisioning or managing servers. With Lambda, you can upload your code as a ZIP file or container image, and Lambda automatically and precisely allocates compute execution power and runs your code based on the incoming request or event. You can write Lambda functions in your favorite language (Node.js, Python, Go, Java, and more) and use both serverless and container tools, such as AWS SAM or Docker CLI, to build, test, and deploy your functions.
4. AWS S3 – Simple Storage Service
Amazon S3 or Amazon Simple Storage Service is a service that provides cloud-based persistent storage through a web service interface. It’s built to store, protect and retrieve data from “buckets” at any time, from anywhere, on any device.
5. AWS EKS – Elastic Kubernetes Service
Amazon EKS is a managed Kubernetes service that makes it easy for you to run Kubernetes on AWS and on-premises. EKS lets you run your Kubernetes applications on both Amazon EC2 and AWS Fargate.
What is AWS Region, Availability Zone? What is the number of AWS Regions and Availability zones as of March 2023?
Ans:
AWS Region:
AWS has the concept of a Region, which is a physical location around the world where we cluster data centers. We call each group of logical data centers an Availability Zone. Each AWS Region consists of a minimum of three, isolated, and physically separate AZs within a geographic area.
Availability Zone:
An Availability Zone (AZ) is one or more discrete data centers with redundant power, networking, and connectivity in an AWS Region. AZs are physically separated by a meaningful distance, many kilometers, from any other AZ, although all are within 100 km (60 miles) of each other.
The number of AWS Regions is 31 and Availability zones are 99 as of March 2023.
What are AWS key pairs?
Ans: A key pair, consisting of a public key and a private key, is a set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance. Amazon EC2 stores the public key on your instance, and you store the private key.
What are the pricing models for EC2 instances?
Ans: There are three pricing models for Amazon EC2 instances:
On-Demand Instances- No upfront payment or long-term commitment. Users are charged on an hourly/second basis. Pricing varies on the capacity of the used instance.
Reserved Instances- These spare EC2 computing capacities are offered for up to 90% off the on-demand price. Recommended for applications with flexible starting and ending times. Not suitable for mission-critical applications.
Spot Instances - Upon using these instances, you get a discount of up to 72% compared to on-demand instances if you commit to a 1-year or 3-year term. Recommended for applications with long-term and steady use.
What are the different types of instances? How do each instance of families differ from each other?
Ans:
a)General Purpose - General purpose instances provide a balance of compute, memory and networking resources, and can be used for a variety of diverse workloads. These instances are ideal for applications that use these resources in equal proportions such as web servers and code repositories.
b)Compute Optimized - Compute Optimized instances are ideal for compute-bound applications that benefit from high-performance processors. Instances belonging to this category are well suited for batch processing workloads, media transcoding, high-performance web servers, high-performance computing (HPC), scientific modeling, dedicated gaming servers and ad server engines, machine learning inference and other compute-intensive applications.
c)Memory Optimized - Memory-optimized instances are designed to deliver fast performance for workloads that process large data sets in memory.
d)Accelerated Computing - Accelerated computing instances use hardware accelerators, or co-processors, to perform functions, such as floating point number calculations, graphics processing, or data pattern matching, more efficiently than is possible in software running on CPUs.
e)Storage Optimized - Storage-optimized instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage. They are optimized to deliver tens of thousands of low-latency, random I/O operations per second (IOPS) to applications.
f)HPC Optimized - High-performance computing (HPC) instances are purpose-built to offer the best price performance for running HPC workloads at scale on AWS. HPC instances are ideal for applications that benefit from high-performance processors such as large, complex simulations and deep learning workloads.
AWS instance types are grouped into families with several subcategories in each family. These subcategories are based on the hardware on which they're run, such as the number of virtual CPUs, memory (RAM), storage volume, and bandwidth capacity into and out of the instances.
What are reserved instances?
Ans: Amazon EC2 Reserved Instances (RI) are not physical instances, but rather provide a significant discount (up to 72%) compared to On-Demand pricing and provide a capacity reservation when used in a specific Availability Zone.
What is an AMI?
Ans: An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS that provides the information required to launch an instance. You must specify an AMI when you launch an instance. You can launch multiple instances from a single AMI when you require multiple instances with the same configuration. You can use different AMIs to launch instances when you require instances with different configurations.
What is Public/Private and EIP?
Ans:
Public IP:
A Public IP address associated with an instance is not static and is lost when the instance is stopped.
Private IP:
Private IP addresses are used for internal communications within the VPC, Public and Elastic IPs allow establishing communication with the internet.
Elastic IP:
An Elastic IP address is a static public address associated with your AWS account. This IP address is not lost when the instance with which it is associated is stopped and it remains allocated to your AWS account until you release it. The prime advantage of using Elastic IPs is that they can be moved or re-associated between instances and Elastic Network Adapters (ENAs).
What is Instance Metadata, Instance user data? Query the EC2 instance metadata and identify the AMI ID used.
Ans:
Instance metadata:
The instance metadata is a document that stores information about the identity of the EC2 instance which can only be accessed from within the instance. Instance metadata is data about your instance that you can use to configure or manage the running instance. Instance metadata is divided into categories, for example, hostname, events, and security groups. Get details about an EC2 instance from inside an EC2 instance. Such as AMI ID, storage devices, DNS hostname, instance ID, instance type, security groups, IP addresses etc. You can also use instance metadata to access user data that you specified when launching your instance.
User data:
Used for bootstrapping. Install OS patches or software when an EC2 instance is launched. It can be used to build more generic AMIs, which can then be configured at launch time dynamically.
Query the EC2 instance metadata and identify the AMI ID used:
Run the following command on the EC2 instance to get its AMI ID:
curl -s
http://169.254.169.254/latest/meta-data/ami-id
Find what is t2, t3 and t4 and c5 and c6 and r5 and r6
t3.medium
$0.0416
t2.medium
$0.0464
Ans:
T2, T3, T4: These are AWS EC2 instance types designed for general-purpose computing. They offer a balance of CPU and memory resources and are suitable for a wide range of applications, including web servers and development environments. T4 instances are powered by AWS Graviton2 processors, offering even better performance and efficiency.
C5, C6: These are compute-optimized EC2 instances that provide high CPU performance. They are ideal for compute-intensive workloads such as data analysis, scientific simulations, and high-performance computing tasks.
R5, R6: These are memory-optimized EC2 instances that offer a high memory-to-CPU ratio. They are well-suited for memory-intensive applications like in-memory databases, big data processing, and caching.
What are the different Processor technologies available in AWS? Read about graviton-based instances.
Ans:
Processor families in AWS:
a – AMD processors
g – AWS Graviton processors
i – Intel processors
AWS Graviton-based general purpose burstable (T4g), general purpose (M7g), compute-optimized (C7g), and memory-optimized (R7g, X2gd) EC2 instances and variants with NVMe-based SSD storage deliver up to 40% better price performance over comparable current generation x86-based instances1 for a broad spectrum of workloads such as application servers, microservices, video encoding, high-performance computing, electronic design automation, compression, gaming, open-source databases, in-memory caches, and CPU-based machine learning inference.
AWS Graviton processors are designed by AWS to deliver the best price-performance for your cloud workloads running in Amazon EC2.
AWS Graviton2 processors deliver a major leap in performance and capabilities over first-generation AWS Graviton processors. Graviton2-based instances provide the best price performance for workloads in Amazon EC2.
AWS Graviton3 processors are the latest in the AWS Graviton processor family. They provide up to 25% better compute performance, up to 2x higher floating-point performance, and up to 2x faster cryptographic workload performance compared to AWS Graviton2 processors.
Connect to EC2 instance using Putty and Console EC2 Connect.
Ans:
EC2 instance connected using Putty:
EC2 instance connected using Console: