Wondering how to assign a custom primary private IP in EC2? We can help you.
You can associate a custom IP address to your Amazon EC2 instance while you configure the instance prior to launch.
Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.
Today, let us see how our Support Techs assign a private IP address in EC2.
How to assign a custom primary private IP in EC2?
The IP address must match the below criteria.
- A valid IPv4 address.
- In the CIDR range of the chosen subnet.
- Available. The IP address must not be tied to any other resource.
Today, let us see steps followed by our Support Techs assign it.
- Firstly, configure an Amazon EC2 instance.
- In the Configure Instance Details section, for Network, select a virtual private cloud (VPC), or create a new VPC. For Subnet, select the subnet, or create a new subnet where you want to launch your instance.
- In the Network interfaces section, for Primary IP, enter the custom private IPv4 address.
- Complete the launch instance wizard configurations, and then launch the instance.
Configure an Amazon EC2 instance.
You can launch an instance using the launch instance wizard.
The launch instance wizard specifies all the launch parameters required for launching an instance.
Initiate instance launch
- Firstly, open the Amazon EC2 console.
- In the navigation bar at the top of the screen, the current Region is displayed (for example, US East (Ohio)). Select a Region for the instance that meets your needs. This choice is important because some Amazon EC2 resources can be shared between Regions, while others can’t.
- From the Amazon EC2 console dashboard, choose Launch instance.
Let us go through the each steps followed.
Step 1: Choose an Amazon Machine Image (AMI)
Firstly when you launch an instance, you must select a configuration, known as an Amazon Machine Image (AMI).
An AMI contains the information required to create a new instance.
When you launch an instance, you can either select an AMI from the list, or you can select a Systems Manager parameter that points to an AMI ID.
By searching the list of AMIs
- Select the type of AMI to use in the left pane:
Quick Start
-
- A selection of popular AMIs to help you get started quickly. To select an AMI that is eligible for the free tier, choose Free tier only in the left pane. These AMIs are marked Free tier eligible.
My AMIs
-
- The private AMIs that you own, or private AMIs that have been shared with you. To view AMIs that are shared with you, choose Shared with me in the left pane.
AWS Marketplace
- An online store where you can buy software that runs on AWS, including AMIs.
Community AMIs
- The AMIs that AWS community members have made available for others to use. To filter the list of AMIs by operating system, choose the appropriate check box under Operating system. You can also filter by architecture and root device type.
-
- Check the Root device type listed for each AMI. Notice which AMIs are the type that you need, either
ebs
orinstance-store
. - Check the Virtualization type listed for each AMI. Notice which AMIs are the type that you need, either hvm or paravirtual. For example, some instance types require HVM. For more information, see Linux AMI virtualization types.
- Check the Boot mode listed for each AMI. Notice which AMIs use the boot mode that you need, either legacy-bios or uefi. For more information, see Boot modes.
- Choose an AMI that meets your needs, and then choose Select.
By Systems Manager parameter
- Firstly, choose Search by Systems Manager parameter (at top right).
- For Systems Manager parameter, select a parameter. The corresponding AMI ID appears next to Currently resolves to.
- Then, choose Search. The AMIs that match the AMI ID appear in the list.
- Select the AMI from the list, and choose Select.
Step 2: Choose an Instance Type
On the Choose an Instance Type page, select the hardware configuration and size of the instance to launch.
Larger instance types have more CPU and memory.
Step 3: Configure Instance Details
On the Configure Instance Details page, change the following settings as necessary (expand Advanced Details to see all the settings).
Then choose Next: Add Storage.
Step 4: Add Storage
The AMI you selected includes one or more volumes of storage, including the root device volume.
On the Add Storage page, you can specify additional volumes to attach to the instance by choosing Add New Volume.
Step 5: Add Tags
On the Add Tags page, specify tags by providing key and value combinations.
You can tag the instance, the volumes, or both. For Spot Instances, you can tag the Spot Instance request only.
Choose Add another tag to add more than one tag to your resources.
Choose Next: Configure Security Group when you are done.
Step 6: Configure Security Group
On the Configure Security Group page, use a security group to define firewall rules for your instance.
These rules specify which incoming network traffic is delivered to your instance. All other traffic is ignored.
Step 7: Review Instance Launch and Select Key Pair
On the Review Instance Launch page, check the details of your instance, and make any necessary changes by choosing the appropriate Edit link.
Once done, choose Launch.
In the Select an existing key pair or create a new key pair dialog box, you can choose an existing key pair, or create a new one.
To launch your instance, select the acknowledgment check box, then choose Launch Instances.
[Need help with EC2? We are here for you]
Conclusion
In short, today we saw how our Support Techs assign a custom primary private IP in EC2.
0 Comments