The EC2 instance configuration options start with naming the EC2 instance. Apart from naming the instance, here are the other configuration options:
Amazon Machine Image (AMI)
This contains the operating system, server, and other applications that are required to launch the instance:
- At this moment, there are about 6,000 AMIs provided to launch the instances. This vast selection allows you to choose an AMI that's pre-configured with the software and tools you need, saving you time and effort.
- You can even create your own custom AMIs to save your preferred configurations for future use.
- Amazon offers operating systems based on Linux, Windows, and macOS.
- Each AMI is specifically designed and optimized for its respective operating system, ensuring compatibility and performance.
- It's crucial to select an AMI that aligns with your software requirements and licensing considerations.
Instance Type
Instance types determine vCPU, memory, storage options, and network performance. Selecting the right instance type is crucial for balancing cost and performance.
- Consider your application's resource demands, such as CPU, memory, and network bandwidth, when making your decision.
- Example of instance type: t2.micro
- The first letter here tells us what AWS family the instance belongs to.
- The number that follows the letter tells us the generation of the instance.
- Micro is the instance size.
- Naming convention helps you quickly identify the instance's capabilities and lineage.
- AWS regularly introduces new generations of instances with improved performance and features.
Another Example: c5ad.16xlarge
- The above instance type belongs to the C AWS instance family and is from the 5th generation.
- The letter "a" after c5 indicates that the instance uses an AMD processor.
- The "d" that follows shows that the instance has local NVMe (Non-Volatile Memory Express).
- The size here is 16xlarge.
- AMD processors can offer a cost-effective alternative for certain workloads.
- NVMe storage provides extremely fast access to data, making it suitable for applications that require high throughput.
Key Pair
A key pair is needed to access the instance.
- AWS provides two options:
- RSA encrypted key
- ED25519 encrypted key
- The key can be .pem or .ppk.
- The key generated can be downloaded and must be kept secure as AWS does not store it.
- Losing your private key can result in the inability to access your instance, so it's essential to store it securely.
Network Settings
These contain the network information.
- These settings control how your instance communicates with the outside world and other AWS resources.
- Proper configuration of network settings is crucial for security and performance.
Security Groups
We can add security groups here or create a new security group.
- An EC2 instance can have multiple security groups.
- Security groups act as virtual firewalls, allowing you to define rules for inbound and outbound traffic.
- By using multiple security groups, you can apply different sets of rules to different types of traffic, enhancing security.
Virtual Private Cloud (VPC)
Selection of the VPC.
- The VPC is a logically isolated network within the AWS cloud, allowing you to create your own private network.
- Choosing the correct VPC ensures that your instance is placed in the appropriate network environment.
- You can create multiple VPCs to isolate different parts of your infrastructure.
Subnets
Subnets (within Availability Zones) further segment the network.
- Subnets are subdivisions of a VPC, allowing you to isolate resources within specific Availability Zones.
- Using subnets improves availability and fault tolerance.
- Each subnet is associated with a specific Availability Zone, ensuring that resources are distributed across different physical locations.
Elastic IPs
You can set static elastic IPs here.
- Elastic IPs are static public IP addresses that you can associate with your instance.
- This ensures that your instance has a consistent public IP address, even if it is stopped and restarted.
- Elastic IPs are useful for hosting applications that require a fixed IP address.
Storage
We can attach one or more storage volumes to the instance.
- The storage has one root volume.
- We have options to add more EBS storage in addition to it.
- All storages must be in the same Availability Zone as the instance.
- The root volume contains the operating system and other essential files.
- EBS volumes provide persistent block storage that can be attached to your instance.
- You can choose from a variety of EBS volume types, each with different performance characteristics and cost.
Advanced Details
There are advanced configuration options for the Elastic Compute Cloud.
- These options allow you to fine-tune your instance for specific use cases and workloads.
- Carefully consider each option to optimize your instance's performance and cost.
User Data
- You have an option to write a script that runs once after the instance is created.
- This is often used for bootstrapping applications or configurations.
-
User data scripts can automate:
- Installation of software
- Configuration of settings
- Other deployment tasks
- Simplifies instance setup and ensures consistency.
Advanced CPU Configurations
Purchasing Options
You can select the purchase type. Some purchasing options:
- Reserved Instances - Long workloads
- Convertible Reserved Instances - Long workloads with flexible instances
- Savings Plan (1 & 3 years) - Commitment to an amount of usage, long workload
- Spot Instances - Short workloads, cheap, can lose instances (less reliable)
- Dedicated Hosts - Book an entire physical server, control instance placement
- Dedicated Instances - No other customers will share your hardware
- Capacity Reservations - Reserve capacity in a specific AZ for a duration of time
Action Configurations
Options of shutdown, hibernate, stop, and other behavior options.
- These options allow you to control the lifecycle of your instance.
- Understanding the different shutdown behaviors is crucial for managing your instances effectively.
- You can choose to:
- Stop
- Terminate
- Hibernate your instance depending on your needs.
These are the important configurations available while launching an instance.
By understanding these configurations, you can make informed decisions about how to set up your EC2 instances.
Connect with me on LinkedIn!
Disclaimer: This article is written by me. I have used ChatGPT for markdown formatting. The contents of the articles were not changed. I would really appreciate your feedback.
Top comments (0)