Amazon Elastic Compute Cloud (Amazon EC2)
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable (scalable) compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. It is the central part of Amazon’s cloud-computing platform known as Amazon Web Services (AWS). Unlike traditional data centers, which lease physical resources, Amazon EC2 clouds lease virtualized resources which are mapped and run transparently to the client by the cloud’s virtualization middleware called ‘Xen’. EC2 is an IaaS cloud computing service that opens Amazon’s large computing infrastructure to its clients. The service is elastic in the sense that it enables customers to increase or decrease its infrastructure by launching or terminating new virtual machines known as instances.
Amazon Elastic Compute Cloud Benefits
Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing customers to quickly scale capacity, both up and down, as their computing requirements change.
Customers have complete control over the type of storage they want to use, the network configurations, the security configuration, …
Customers have the choice of multiple instance types, operating systems, and software packages.
- Amazon Elastic Compute Cloud allows its customers to select a configuration of memory, CPU, instance storage, and the boot partition size that is optimal for their choice of operating system and application.
- Amazon EC2 offers a highly reliable environment where replacement instances can be rapidly and predictably commissioned. .
Amazon EC2’s simple web service interface allows customers to obtain and configure capacity with minimal friction. It provides them with complete control of their computing resources and lets them run on Amazon’s proven computing environment.
Amazon EC2 is integrated with most of the AWS services such as S3, VPC, Lambda Redshift, RDS, EMR, and so on.
- Using EC2 and the other services of AWS, customers can get a complete solution for all of their IT needs. The data center and network architecture of AWS built to meet the requirements of the most security-sensitive organizations.
- Amazon EC2 works in conjunction with Amazon VPC to provide security and robust networking functionality for it’s customers compute resources.
Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
- Instances:- Amazon EC2 presents a virtual computing environment, allowing its customers to use web service interfaces to launch instances with a variety of operating systems, load them with their custom application environment, manage network’s access permissions, and run their image using as many or few systems as they desire
- Regions and Availability Zones:- AWS offers multiple physical locations for its customers resources such as instances and Amazon EBS volumes, known as Regions and Availability Zones.
- Amazon EBS volumes (EBS):- EBS is an easy to use and high performance block storage service designed for use with Amazon EC2 for both throughput and transaction intensive workloads at any scale.
- Virtual private clouds (VPCs):- Amazon Virtual Private Cloud (Amazon VPC) is a secure and seamless bridge between customers existing IT infrastructure and the AWS cloud. Amazon VPC enables customers to connect their existing infrastructure to a set of isolated AWS compute resources via a Virtual Private Network (VPN) connection.
- Instance types:- Amazon EC2 provides a large selection of instance types, which can be optimized to fit different use cases. Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give customers the flexibility to choose the appropriate mix of resources for their applications. Each instance type includes one or more instance sizes, allowing customers to scale their resources to the requirements of their target workload.
- Key pairs:- Secure login information for your instances using key pairs (AWS stores the public key, and you store the private key in a secure place)
- Amazon Machine Images (AMIs):- AMI is a special type of virtual product that is used to create a virtual machine within EC2. It is a Pre-configured templates for customers instances, that package the bits they need for their server which includes the operating system and additional software.
- Security groups:- A firewall that enables customers to specify the protocols, ports, and source IP ranges that can reach them instances using security groups
- Tag:- Tags are words or phrases that act as metadata for identifying and organizing your AWS resources. A resource can have up to 50 user-applied tags.
- Elastic IP addresses:- An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. An Elastic IP address is associated with customers AWS accounts. With an Elastic IP address, AWS customers can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.
- Instance store volumes:- An AWS instance store is a temporary storage type located on disks that are physically attached to a host machine. Instance stores are made up of single or multiple instance store volumes exposed as block devices. Storage volumes are for temporary data which will be deleted when customers stop or terminate their instance.
- Flexible Pricing:- Charge of the server is on an hourly basis or per second, such that customers don’t have to pay a huge amount of expense when provision their servers on EC2.
Amazon Machine Image
Amazon Machine Image
An Amazon Machine Image (AMI) is a packaged environment containing a software configuration and other parts that is used to create a virtual machine within the EC2. In other word, an AMI is a template that contains a software configuration from where customers launch instances, which are copies of the AMI running as virtual servers in the cloud.
- An instance is a virtual server in the cloud. Its configuration at launch is a copy of the AMI that AWS clients specified when they launched the instance. They are able to launch different types of instances from a single AMI. An instance type essentially determines the hardware of the host computer used for customers instance. Each instance type offers different compute and memory capabilities.
- An AMI defines the initial software that will be on an instance when it is launched. It also defines every aspect of the software state at instance launch, which includes:
- The Operating System (OS) and its configuration
- The initial state of any patches
- Application or system software.
- Launch permissions control which AWS accounts can use the AMI to launch instances. The owner of an AMI determines its availability by specifying launch permissions. The owner of an AMI determines its availability by specifying launch permissions. There are three types of Launch permissions
AMIs come in four main categories:
- Community AMIs by AWS:—AWS publishes AMIs with versions of many different OSs, both Linux and Windows. Launching an instance based on one of these AMIs will result in the default OS settings, similar to installing an OS from the standard OS ISO image. Free to use, generally customers just select the operating system they want.
- AWS Marketplace AMIs:—AWS Marketplace is an online store that helps customers find, buy, and immediately start using the software and services that run on Amazon EC2. It is used for software providers to sell their products through AWS Marketplace. The customers will be billed by AWS, then AWS will pay the AMI owner in their share of the sale.
- Generated from Existing Instances:—An AMI can be created from an existing Amazon EC2 instance. This is a very common source of AMIs. Customers launch an instance from a published AMI, and then the instance is configured to meet all the customer’s corporate standards for updates, management, security.
- My AMIs – Uploaded Virtual Servers:—AMIs that customers create themselves. Using AWS VM Import/Export service, customers can create images from various virtualization formats, including raw, VHD, VMDK, and OVA.
- VM Import/Export not only enables AWS clients import Virtual Machines (VMs) form their existing environment as an Amazon EC2 instance, but it also export them back to their on-premises environment as the client desire. They also can export imported instances back to their on-premises virtualization infrastructure, allowing them to deploy workloads across their IT infrastructure.
The AWS Cloud infrastructure is built around Regions and Availability Zones (AZs). A Region is a physical location in the world with multiple AZs. Availability Zones consist of one or more discrete data centers, each with redundant power and networking, housed in separate facilities that are located on stable flood plains.
A Region is a geographical area that it is completely independent, and each Availability Zone is isolated. However, the Availability Zones in a Region are connected through low-latency links. A Local Zone is the extension of a Region, which is different customer Region. It is AWS infrastructure deployment that places select services closer to clients end users, and provides a high-bandwidth backbone to the AWS infrastructure, that is ideal for latency-sensitive applications
Since each Amazon Region is designed to be completely isolated from the other Amazon Regions.
- It achieves the greatest possible fault tolerance and stability.
- It enable customers to replicate data within a region and between regions using private or public Internet connections.
- It allow customers to retain complete control and ownership over the region in which their data is physically located.
An AWS account provides multiple Regions so that its customers can launch Amazon EC2 instances in locations that meet their requirements.
- The largest AWS region North East US, where N. Virginia has six zones followed by Ohio (three). The rest includes N. California (three), Oregon (three), Mumbai (two), Seoul (two), Singapore (two), Sydney (three), Tokyo (four), Bahrain Canada Central (two) China Beijing (two), Frankfurt (three), Ireland (three), London (two), and São Paulo (three). Moving forward, new AWS regions will have three or more zones whenever necessary. When a customer create certain resources in a region, they will be asked to choose a zone in which to host that resource.
Availability Zones are physically separate and isolated from each other. AZs span one or more data centers and have direct, low-latency, high throughput and redundant network connections between each other. Availability Zones consist of one or more discrete data centers, each with redundant power, networking, and connectivity, housed in separate facilities.
- Availability Zones offer clients the ability to operate production applications and databases that are more highly available, fault tolerant, and scalable.
- Each AZ is designed as an independent failure zone.
- Although Availability Zones are isolated the Availability Zones in a Region, however, are connected through low-latency links.
- Each AWS Region has multiple Availability Zones and data centers. AWS clients can deploy their applications across multiple Availability Zones in the same region.
- Availability Zones are connected to each other with fast and private fiber-optic network, which enables applications to automatically fail-over between Availability Zones without interruption.
- In addition to replicating applications and data across multiple data centers in the same Region using Availability Zones, clients can also choose to further increase redundancy and fault tolerance by replicating data between geographic Regions.
- They can do so using both private and public Networks to provide an additional layer of business continuity, or to provide low latency access across the globe.
- Each Availability Zone is designed as an independent failure zone. This means that Availability Zones are physically separated within a typical metropolitan region and are located in lower risk flood areas.
- An Availability Zone is represented by a region code followed by a letter identifier; for example, us-east-1a.
- Inorder to coordinate Availability Zones across accounts, clients need to use the AZ ID, that is a unique and consistent identifier for an Availability Zone.
- use1-az1 is an AZ ID for the us-east-1.
- Viewing AZ IDs enables customers to determine the location of resources in one account relative to the resources in another account.
- When an instance launched, AWS clients can select an Availability Zone or let AWS choose one for them. Distributing instances across multiple Availability Zones enable customers use the other inst incase one instance fails. They can design their application so that an instance in another Availability Zone can handle requests.
- They can also use Elastic IP addresses to mask the failure of an instance in one Availability Zone by rapidly remapping the address to an instance in another Availability Zone.
AWS Local Zones are an AWS infrastructure deployment service, that places AWS compute, storage, database, and other select services closer to large population, industry, and IT centers where no AWS Region exists today.
- Each AWS Local Zone location is an extension of an AWS Region where clients can run their latency-sensitive applications using AWS services such as Amazon Elastic Compute Cloud, Amazon Virtual Private Cloud, Amazon Elastic Block Store, Amazon FSx, and Amazon Elastic Load Balancing in geographic proximity to end-users.
- Local Zones enable customers seamlessly connect to the full range of services in the AWS Region such as Amazon Simple Storage Service and Amazon DynamoDB through the same APIs and tool sets.
- AWS Local Zones provide a high-bandwidth, secure connection between local workloads and those running in the AWS Region, enabling customers to seamlessly connect back to their other workloads running in AWS and to the full range of in-region services through the same APIs and tool sets.
- A Local Zone is represented by a Region code followed by an identifier that indicates the location,
- us-west-2-lax-1a —> Los Angeles
- With AWS Local Zones, clients can easily run single-digit millisecond latency for use cases such as media & entertainment content creation, real-time gaming, reservoir simulations, electronic design automation, and machine learning.
Edge locations are Content Delivery Network (CDN) endpoints for CloudFront. Amazon CloudFront is a web service that speeds up distribution of customers static and dynamic web content, such as .html, .css, .js, and image files, to their users.
- CloudFront delivers customer content through a worldwide network of data centers called edge locations. When a user requests content that they’re serving with CloudFront, the user is routed to the edge location that provides the lowest latency (time delay), so that content is delivered with the best possible performance.
- If the content is already on the edge location with the lowest latency, CloudFront delivers it immediately.
- If the content is not in that edge location, CloudFront retrieves it from an origin that the wayy the customer defined it—such as an Amazon S3 bucket, a MediaPackage channel, or an HTTP server.
- CloudFront speeds up the distribution of customer content by routing each user request.
Regional Edge Caches sit between customers CloudFront Origin servers and the Edge Locations.
A Regional Edge Cache has a larger cache-width than each of the individual Edge Locations.
How do I create an AWS account?
Amazon Web Services (AWS) is cloud computing service, that offering IT infrastructure services to businesses as web services. the major key benefits of cloud computing is the opportunity to replace upfront capital infrastructure expenses with low variable costs that scale with the business. AWS provides a highly reliable, scalable, low-cost infrastructure platform in the cloud that powers hundreds of thousands of businesses in 190 countries around the world.
What exactly does AWS do?
Amazon Web Services offers a broad set of global cloud-based products including compute, storage, databases, analytics, networking, mobile, developer tools, management tools, IoT, security, and enterprise applications: on-demand, available in seconds, with pay-as-you-go pricing. From data warehousing to deployment tools, directories to content delivery, offers over 140 AWS services such as EC2, Lightsail, database and many more. New services can be provisioned quickly, without the upfront capital expense. This allows enterprises, start-ups, small and mediumsized businesses, and customers in the public sector to access the building blocks they need to respond quickly to changing business requirements. This whitepaper provides you with an overview of the benefits of the AWS Cloud and introduces you to the services that make up the platform.
Here is the steps how to create an AWS account
- Open the Amazon Web Services home page.
- Choose Create an AWS Account.
- Enter your account information, and then choose Continue.
- Choose Personal or Professional.
- Enter your company or personal information.
- Read and accept the AWS Customer Agreement.
- Choose Create Account and Continue.
- You receive an email to confirm that your account is created. You can sign in to your new account using the email address and password you registered with. However, you can’t use AWS services until you finish activating your account.
- On the Payment Information page, enter the information about your payment method, and then choose Verify and Add.
- Choose your country or region code from the list.
- Enter a phone number where you can be reached in the next few minutes.
- Enter the code displayed in the CAPTCHA, and then submit.
- In a few moments, an automated system contacts you.
- Enter the PIN you receive, and then choose Continue.
- On the Select a Support Plan page, choose one of the available Support plans. For a description of the available Support plans and their benefits, see Compare AWS Support plans.
- After you choose a Support plan, a confirmation page indicates that your account is being activated. Accounts are usually activated within a few minutes, but the process might take up to 24 hours.
- You can sign in to your AWS account during this time.
A security group acts as a virtual firewall for customers instance to control inbound and outbound traffic. Security groups allow customers to control traffic based on port, protocol, and source/destination.
- A security group is default deny; that is, it does not allow any traffic that is not explicitly allowed by a security group rule, which is defined by the three attributes
- Port:– The port number affected by this rule. For instance, port 80 for HTTP traffic.
- Protocol:– The communications standard for the traffic affected by this rule. Source/Destination Identifies the other end of the communication, the source for incoming traffic rules, or the destination for outgoing traffic rules.
- The source/destination:– can be defined in two ways: CIDR block—An x.x.x.x/x style definition that defines a specific range of IP addresses.
- Security group includes any instance that is associated with the given security group. This helps prevent coupling security group rules with specific IP addresses.
- Security groups act at the instance level, not the subnet level. Therefore, each instance in a subnet in their VPC can be assigned to a different set of security groups.
- For each security group, customers add rules that control the inbound traffic to instances, and a separate set of rules that control the outbound traffic.
- Customers can add or remove rules for a security group (also referred to as authorizing or revoking inbound or outbound access). A rule applies either to inbound traffic (ingress) or outbound traffic (egress).
- If the customers VPC has a VPC peering connection with another VPC, a security group rule can reference another security group in the peer VPC.
- Security group is the firewall of EC2 Instances
- Security groups are tied to an instance
- Security groups has to be assigned explicitly to the instance. This means any instances within the subnet group gets the rule applied. If you have many instances, managing the firewalls using Network ACL can be very useful. Otherwise, with Security group, you have to manually assign a security group to the instances.
- Security groups are stateful: This means any changes applied to an incoming rule will be automatically applied to the outgoing rule.
- Security group support allow rules only (by default all rules are denied). e.g. You cannot deny a certain IP address from establishing a connection.
- All rules in a security group are applied whereas i.e. Security groups evaluate all the rules in them before allowing a traffic
- Security group first layer of defense
A security group acts as a virtual firewall for customers EC2 instances to control incoming and outgoing traffic. Inbound rules control the incoming traffic to the instance, and outbound rules control the outgoing traffic from your instance. When customers launch an instance, they can specify one or more security groups. If a security group was not specified, Amazon EC2 uses the default security group. Additional rules to each security group that allow traffic to or from its associated instances was allowed. New and modified rules are automatically applied to all instances that are associated with the security group. When Amazon EC2 decides whether to allow traffic to reach an instance, it evaluates all of the rules from all of the security groups that are associated with the instance.
The rules of a security group control the inbound traffic that’s allowed to reach the instances that are associated with the security group. The rules also control the outbound traffic that’s allowed to leave them.
Steps How to create a security group in AWS
- Open the Amazon EC2 console.
- From the navigation bar, select a Region for the security group. Security groups are specific to a Region, so you should select the same Region in which you created your key pair.
- In the navigation pane, choose Security Groups.
- Choose Create security group.
- In the Basic details section, do the following:
- Enter a name for the new security group and a description. Use a name that is easy for you to remember, such as your user name, followed by _SG_, plus the Region name. For example, me_SG_uswest2.
- In the VPC list, select your default VPC for the Region.
- In the Inbound rules section, create the following rules (choose Add rule for each new rule):
- Choose HTTP from the Type list, and make sure that Source is set to Anywhere (
- Choose HTTPS from the Type list, and make sure that Source is set to Anywhere (
- Choose SSH from the Type list. In the Source box, choose My IP to automatically populate the field with the public IPv4 address of your local computer. Alternatively, choose Custom and specify the public IPv4 address of your computer or network in CIDR notation. .
- Choose HTTP from the Type list, and make sure that Source is set to Anywhere (
- Choose Create security group.
Amazon EC2 uses public-key cryptography to encrypt and decrypt login information. At the basic level, a sender uses a public key to encrypt data, which its receiver then decrypts using another private key. These two keys, public and private, are known as a key pair.
- Key pairs can be created through the AWS Management Console, CLI, or API, or customers can upload their own key pairs. AWS stores the public key, and the private key is kept by the customer.
- Public-key cryptography enables customers to securely access their instances using a private key instead of a password.
- Linux instances do not have a password already set and customers must use the key pair to log in to Linux instances.
- On Windows instances, customers need the key pair to decrypt the administrator password. Using the decrypted password, they can use RDP and then connect to their Windows instance.
- Amazon EC2 stores only the public key, thus customers either need to generate it inside Amazon EC2 or import it. Since the private key is not stored by Amazon, it’s advisable to store it in a secure place as anyone who has this private key can access the AWS account.
- When launching an instance, customers need to specify the name of the key pair that they plan to use to connect to the instance.
- Customers also must specify the private key that corresponds to the key pair they specified when they launched the instance.
Before going directly to create it’s important to know What is an AWS key pair? Then it will be a lot easier to understand how create AWS key pair. A key pair is a private key and a public key that consist of a set of security credentials that AWS clients use to prove their identity when connecting to an instance. Amazon EC2 is responsible of storing the public key, and and the client is responsible for storing the private key. Amazon EC2 provides scalable computing capacity in the Amazon Web Services Cloud. Using Amazon EC2 eliminates customers need to invest in hardware up front, so they can develop and deploy applications faster. AWS customers can use Amazon EC2 to launch as many or as few virtual servers as they need, configure security and networking, and manage storage.
Steps how to create a key pair
- Open the Amazon EC2 console.
- In the navigation pane, choose Key Pairs.
- Choose Create key pair.
- For Name, enter a descriptive name for the key pair. Amazon EC2 associates the public key with the name that was specified as the key name. A key name can include up to 255 ASCII characters. It can’t include leading or trailing spaces.
- For File format, choose the format in which to save the private key. To save the private key in a format that can be used with OpenSSH, choose pem. To save the private key in a format that can be used with PuTTY, choose ppk.
- Choose Create key pair.
- The private key file is automatically downloaded by the browser. Save the private key file in a safe place.
Instance Metadata (TAGS)
Instance metadata is data about customers instance that they can use to configure or manage the running instance. Instance metadata is divided into categories such as, host name, events, and security groups.
- Amazon Web Services allows customers to assign metadata to their AWS resources in the form of tags. Each tag is a simple label consisting of a customer-defined key and an optional value that can make it easier to manage, search for, and filter resources. Although there are no inherent types of tags, they enable customers to categorize resources by purpose, owner, environment, or other criteria.
- The AWS Management Console is organized by AWS service, allows customers to create a custom console that organizes and consolidates AWS resources based on one or more tags or portions of tags. Using this tool, customers can consolidate and view data for applications that consist of multiple services and resources in one place.
Best Practices for Tags
- Employ a Cross-Functional Team to Identify Tag Requirements
- Use Tags Consistently.
- Consider tags from a cost/benefit perspective when deciding on a list of required.
- Adopt a Standardized Approach for Tag Names and Names for AWS tags are case sensitive.
- Use Both Linked Accounts and Cost Allocation Tags
- Avoid Multi-Valued Cost: Allocation Tags For shared resources.
- Tag Everything
The type of instance that client specify determines the hardware of the host computer used for their instance. Each instance type offers different compute, memory, and storage capabilities and are grouped in instance families based on these capabilities. Each instance type provides higher or lower minimum performance from a shared resource.
GENERAL PURPOSE INSTANCES
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.
- Amazon EC2 A1 instances deliver significant cost savings and are ideally suited for scale-out and Arm-based workloads that are supported by the extensive Arm ecosystem. Powered by the AWS Nitro System, a combination of dedicated hardware and lightweight hypervisor.
- T3 and T3a instances are the next generation burstable general-purpose instance type that provide a baseline level of CPU performance with the ability to burst CPU usage at any time for as long as required. T3 instances offer a balance of compute, memory, and network resources and are designed for applications with moderate CPU usage that experience temporary spikes in use.
- T2 instances are Burstable Performance Instances that provide a baseline level of CPU performance with the ability to burst above the baseline.
- Amazon EC2 M6g instances are powered by Arm-based AWS Graviton2 processors. They deliver up to 40% better price/performance over current generation M5 instances and offer a balance of compute, memory, and networking resources for a broad set of workloads.
- Custom built AWS Graviton2 Processor with 64-bit Arm Neoverse cores
- Support for Enhanced Networking with Up to 25 Gbps of Network bandwidth
Compute Optimized instances are ideal for compute bound applications that benefit from high performance processors. Instances belonging to this family 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.
- C5n instances are ideal for high compute applications (including High Performance Computing (HPC) workloads, data lakes, and network appliances such as firewalls and routers) that can take advantage of improved network throughput and packet rate performance. C5n instances offers up to 100 Gbps network bandwidth and increased memory over comparable C5 instances.
- C5 instances are optimized for compute-intensive workloads and deliver cost-effective high performance at a low price per compute ratio. C5 instances offer a choice of processors based on the size of the instance.
- C5 instances are ideal for applications where you prioritize raw compute power, such as gaming servers, scientific modeling, high-performance web servers, and media transcoding.
- C4 instances are the latest generation of Compute-optimized instances, featuring the highest performing processors and the lowest price/compute performance in EC2
Memory optimized instances are designed to deliver fast performance for workloads that process large data sets in memory.
- Amazon EC2 z1d instances offer both high compute capacity and a high memory footprint. High frequency z1d instances deliver a sustained all core frequency of up to 4.0 GHz, the fastest of any cloud instance.
- X1 and X1e instances are optimized to provide a high ratio of memory to compute with the X1e family delivering the highest memory to compute ratio among EC2 offerings.
- These instances are used for the highest need memory-intensive applications such as SAP HANA, providing a strong foundation for real-time applications.
- Instances are optimized for large-scale, enterprise-class, in-memory applications and high-performance databases, and have the lowest price per GiB of RAM among Amazon EC2 instance types.
- High Memory instances have the greatest amount of available RAM, providing 6 TB, 9 TB, or 12 TB of memory in a single instance. Like X1 and X1e, these are suited to production deployments of hugely memory intensive, real-time databases such as SAP HANA.
- R4 instances are optimized for memory-intensive applications and offer better price per GiB of RAM than R3. The RAM sizes are a step below the X1s.
- R5 and R5a are respectively the Intel and AMD offerings of “regular” memory optimized instances. These instances are ideal for memory intensive applications such as real-time big data analytics, large in-memory caches, and high-performance databases. The R5 and R5a instances benefit from the AWS Nitro System, which gives you access to almost all of the compute and memory resources of a server (i.e. allocating as little as possible to the OS). This optimization allows for lower cost when compared on a per-GiB basis to competitors
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.
- H1 and D2 instances feature up to 16 TB 48 TB of HDD-based local storage respectively, both deliver high disk throughput, and a balance of compute and memory. D2 instances offer the lowest price per disk throughput performance on Amazon EC2.
- I3 and I3en These instance family provides Non-Volatile Memory Express (NVMe) SSD-backed instance storage optimized for low latency, very high random I/O performance, high sequential read throughput (I3) and provide high IOPS, high sequential disk throughput (I3en), and offers the lowest price per GB of SSD instance storage on Amazon EC2.
AWS provides different families of instance types based on different needs. Some families support general-purpose computing, while others are optimized for processing, memory, storage, and other purposes.Within each family, different sizes of instances offer increasing levels of processing power, available memory, storage capacity, and network bandwidth.
- Amazon EC2 is free to try. There are four ways to pay for Amazon EC2 instances:
- Reserved Instances, and
- Spot Instances.
- Customers can also pay for Dedicated Hosts which provide them with EC2 instance capacity on physical servers dedicated to your use.
- With On-Demand instances, users pay for computing capacity by per hour or per second depending on which instances they run.
- Applications with short term, spiky, or unpredictable workloads that cannot be interrupted.
- Applications being developed or tested on EC2 for the first time.
- This is the most flexible pricing option, as it requires no up-front commitment, and the customer has control over when the instance is launched and when it is terminated.
- It is the least cost-effective of the three pricing options per compute hour, but its flexibility allows customers to save by provisioning a variable level of computing for unpredictable workloads.
- Reserved Instances provide customers with a significant discount (up to 75%) compared to On-Demand instance pricing.
- For applications that have steady-state or predictable usage, require reserved capacity or can commit to using EC2 for a 1 or 3 year period, Reserved Instances can provide significant savings compared to using On-Demand instances.
- The Reserved Instance pricing option enables customers to make capacity reservations for predictable workloads. By using Reserved Instances for these workloads, customers can save up to 75 percent over the on-demand hourly rate.
An additional benefit is that capacity in the AWS data centers is reserved for that customer. There are two factors that determine the cost of the reservation: the term commitment (The amount of the discount is greater the more the customer pays upfront), and the payment option (All Upfront, Partial Upfront, No Upfront
- Amazon EC2 Spot instances allow users to bid on spare Amazon EC2 computing capacity for up to 90% off the On-Demand price.
- Spot instances are recommended for applications that have flexible start and end times, applications that are only feasible at very low compute prices or users with urgent computing needs for large amounts of additional capacity.
- Spot instances are for workloads that are not time-critical and are tolerant of interruption, Spot Instances offer the greatest discount.
- With Spot Instances, customers specify the price they are willing to pay for a certain instance type. When the customer’s bid price is above the current Spot price, the customer will receive the requested instance(s).
- These instances will operate like all other Amazon EC2 instances. The instances will run until
- The customer terminates them.
- The Spot price goes above the customer’s bid price.
- There is not enough unused capacity to meet the demand for Spot Instances.
EC2 Dedicated Host
An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses, including Windows Server, Microsoft SQL Server, SUSE, and Linux Enterprise Server.
An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses, including Windows Server, Microsoft SQL Server, SUSE, and Linux Enterprise Serve
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make webscale computing easier for developers. The Amazon EC2 simple web service interface allows customers to obtain and configure capacity with minimal friction. It provides them with complete control of the computing resources and run on Amazon’s proven computing environment.
Amazon EC2 reduces the time required to obtain and boot new server instances (called Amazon EC2 instances) to minutes, allowing customers to quickly scale capacity, both up and down, as the computing requirements change. Amazon EC2 changes the economics of computing by allowing to pay only for capacity that actually use. Amazon EC2 provides developers and system administrators the tools to build failure resilient applications and isolate themselves from common failure scenarios.
How to create an EC2 Instance?
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- Choose Launch Instance.
- Choose an Amazon Machine Image (AMI), find an Amazon Linux AMI at the top of the list and choose Select.
- Choose an Instance Type, choose Next: Configure Instance Details.
- Configure Instance Details, provide the following information:
- For Network, choose the entry for the same VPC that you noted when you created your EFS file system in Step 1: Create Your Amazon EFS File System.
- For Subnet, choose a default subnet in any Availability Zone.
- For File systems, make sure that the EFS file system that you created in Step 1: Create Your Amazon EFS File System is selected. The path shown next to the file system ID is the mount point that the EC2 instance will use, which you can change. Choose Add to user data to mount the file system when the EC2 is launched.
- Under Advanced Details, confirm that the user data is present in User data.
- Choose Next: Add Storage.
- Choose Next: Add Tags.
- Name your instance and choose Next: Configure Security Group.
- Configure Security Group, set Assign a security group to Select an existing security group. Choose the default security group to make sure that it can access your EFS file system.You can’t access your EC2 instance by Secure Shell (SSH) using this security group. SSH access isn’t required for this exercise. To add access by SSH later, you can edit the default security and add a rule to allow SSH. Or you can create a new security group that allows SSH. You can use the following settings to add SSH access:
- Type: SSH
- Protocol: TCP
- Port Range: 22
- Source: Anywhere 0.0.0.0/0
- Choose Review and Launch.
- Choose Launch.
- Select the check box for the key pair that you created, and then choose Launch Instances.
- In the Amazon EC2 console, select the instance, and then choose Connect.
- In the Connect To Your Instance dialog box, choose Get Password (it will take a few minutes after the instance is launched before the password is available).
- Choose Browse and navigate to the private key file you created when you launched the instance. Select the file and choose Open to copy the entire contents of the file into the Contents field.
- Choose Decrypt Password. The console displays the default administrator password for the instance in the Connect To Your Instance dialog box, replacing the link to Get Password shown previously with the actual password.
- Record the default administrator password, or copy it to the clipboard. You need this password to connect to the instance.
- Choose Download Remote Desktop File. Your browser prompts you to either open or save the .rdp file.
- You may get a warning that the publisher of the remote connection is unknown. You can continue to connect to your instance.
- When prompted, log in to the instance, using the administrator account for the operating system Enter the password that you recorded or copied previously.
- To verify the identity of the remote computer, or simply choose ok
- Choose Yes in the Remote Desktop Connection window to connect to your instance.