First, select instance that you want to replicate in aws web and go to actions->image->create image.
And then I increased Size(GiB) of default instance volume from 8 to 20 just to be sure that replica has enough space.
Give image name, and click on Create Image button. So after that AMI is created and it takes some time so you can see the progress on link that was given on prompt window.
Finally, you can go to Intances window, create a new instance using the AMI you just created.
When I created a new instance, I created a new security group for that instance.
Or can I choose the same security group that I used for the original instance?
Checklist:
1.
I commented out a line
Redirect / https://whatevermydomain.com
in /etc/apache2/sites-available/000-default.conf. Because it was redirecting requests to my replica server to the original server at https://whatevermydomain.com.
2.
I re-associated an elastic ip address that was being used by a stopped instance previously to my newly created replica. I went to "Elastic IPs" on aws web -> Choose ip that I want to re-associate -> click mouse 2 on it -> "associate address" and choose instance that I want to associate it to. Don't forget to check "Allow Elastic IP to be reassociated if already attached" if it is used by another instance.