π‘ Elastic IP: Your Server's Permanent Address in the Cloud
Hey Cloud Networkers and Stability Savants! π
Welcome to Day 4 of the #100DaysOfCloud Challenge: Allocate Elastic IP! Weβre diving deeper into AWS networking and tackling small, but mighty, steps in the migration plan from KodeKloud Engineer.
We've set up our Key Pair, defined our firewall (Security Group), and carved out our network space (Subnet). But what happens if our server reboots? Its public IP address might change! That's where the Elastic IP (EIP) saves the day.
1. Introduction: Why Your Server Needs an Elastic IP π‘
By default, an EC2 instance launched into a public subnet receives a Public IP address. This address is dynamic, meaning it changes every time the instance is stopped and started. This is a nightmare for DNS records, client firewall rules, and third-party integrations!
- What it is: An Elastic IP is a static, public IPv4 address designed for dynamic cloud computing.
- Key Feature: Once allocated to your AWS account, it stays with your account, not with a specific server. You can instantly remap the EIP to any other instance in the same region.
- Why it Matters: EIPs ensure that if a server fails, you can launch a replacement instance and assign the EIP to it immediately, achieving fast failover and maintaining continuous service under the same IP address.
Our task today is simply to allocate an EIP and name it datacenter-eip.
Let's secure our permanent address! π
2. Step-by-Step Guide: Allocating the Elastic IP via AWS Console
We will use the AWS Management Console within the EC2 Dashboard to allocate this static IP.
Step 2.1: Navigate to the EC2 Dashboard
Elastic IP addresses are managed under the EC2 service, as they are network resources.
- Log in to the AWS Console.
- In the AWS console search bar, type
EC2and click on the first result to open the EC2 Dashboard.
- In the left-hand navigation menu, scroll down to the "Network & Security" section and click on "Elastic IPs".
Step 2.2: Allocate the New Address
- Click the orange "Allocate Elastic IP address" button.
- On the allocation screen, you'll see a few options:
-
Network border group: Leave as the default (usually the region you are in, e.g.,
us-east-1). -
Public IPv4 address pool: Select
Amazon's pool of IPv4 addresses. (The default option, as you are not bringing your own IP.)
-
Network border group: Leave as the default (usually the region you are in, e.g.,
Step 2.3: Add the Name Tag
For easier management, we need to tag the EIP with the required name.
- Scroll down to the "Tags" section.
- Click "Add new tag".
- For the tag Key, type
Name. - For the tag Value, type the required name:
datacenter-eip.
Step 2.4: Finalize Allocation
- Click the "Allocate" button at the bottom.
AWS will now provision a new, static public IP address and assign it to your account! You will see the new EIP listed in the Elastic IPs dashboard, ready to be associated with an EC2 instance. Great job! π
3. Key Takeaways π
- Static IP: EIPs provide a permanent, static IP address, unlike the default dynamic Public IP.
- Fast Failover: You can instantly reassign an EIP to a new instance to handle outages.
- Region-Specific: EIPs are tied to the region they are allocated in.
4. Common Mistakes to Avoid π«
- Billing Trap: AWS charges you for unassociated Elastic IP addresses. If you allocate one, make sure it is actively attached to a running instance or a network interface. If it sits unused, you incur a small fee!
- Forgetting the Tag: Always tag your EIPs, as required in this task. It's crucial for resource management and cost tracking.
- Cross-Region Use: You cannot associate an EIP from
us-east-1to an EC2 instance running ineu-west-1.
5. Conclusion + Call to Action! π
You now control a critical piece of the networking puzzle: a static public address! This EIP will be essential for creating reliable connections to your application servers. Keep crushing the 100 Days of Cloud Challenge!
If you found this guide helpful, please:
π¬ Letβs connect on LinkedIn: Cloud, DevOps, consistency, and learning in publicβletβs build together!
π Hritik Rajβ Support my journey on GitHub: Follow my #100DaysOfCloud challenge with real AWS tasks and hands-on learning
π GitHub β 100 Days of Cloud
Next up, we'll continue configuring the network, possibly attaching this EIP to a resource! Happy networking! π»







Top comments (0)