Sometimes, you need to restart your Lightsail instance for effecting new settings on the server. In AWS, for both EC2 and Lightsail public IP changed on restart or reboot, so it causes your website down due to A record change in the DNS. To overcome this situation, AWS provides static IP for Lightsail instances as well as for EC2 instances. In this article, I am going to show you how to attach static IP to AWS Lightsail instance. So, let’s get started.
How to Attach Static IP to AWS Lightsail Instance
Step 1: You can allocate static IP or elastic IP from the AWS Lightsail dashboard by clicking on
Networking tab to create a new static IP.
Step 2. Now, click on
create static IP and continue.
Step 3. When you click on
Create static IP, a new window will appear where you can choose the static IP location, Lightsail instance and you can give a name to the static IP.
Step 4: After selecting the lightsail instance, give a static IP name and click on
Awesome, you have successfully allocate a static IP and attached to the Lightsail instance
How to Detach and Release Static IP from AWS Lightsail Instance
Step 1: To detach the static IP, first go to
Networking on the Lightsail dashboard.
Step 2: Now click on the static IP you want to release, make sure you clicked on the correct IP.
Step 3: Click on the
Detach to release the IP from the instance.
When you click on the
Detach, a confirmation screen will appear, click on
Step 4: After detaching the static IP, delete the IP address. If you keep the IP address unused, you will be charged until you reattach this static IP to an instance. To delete the static IP, click on the
Networking at Lightsail dashboard.
You can see it shows
Not Attached. To delete this IP click on the
tree dot symbol on upper right-hand corner. When you click on the
Delete button, it will ask for confirmation. Click on
Yes,delete button to delete the IP forever.
What is static IP in AWS or AWS Lightsail
Static IP is nothing but the address, which is unchanged after restart, stop of AWS instances.
How much does a static IP cost in AWS Lightsail?
A static IP address is free of cost when in use with instance. If you keep static IP unused, you will be charged until re-attach to the instance. A can allocate upto 5 static IP on AWS Lightsail for free.
In this tutorial, you have learned to attach static IP to AWS Lightsail instance, also learned how to detach and delete static IP. If you have any doubts feel free to contact me, I will definitely try to help you. Also, you can join our elite Facebook group to get direct help from me. If you like this tutorial, please share this article on your social media handle.