https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html
This video let's see how to create the AMI using our EC2 instance it's so so so far we have this
EC2 instance and we have deployed the PHP application on this instance
Right.
And we can save our work.
So all the software that we have installed all the deployments that we have done cloning of the application
all that work that we have done right can be saved using this AMI.
So so so the software the configuration the deployment will be baked into the AMI.
Right.
And later at any point in the course we'll be able to create a server just like this using the
AMI.
So that's what we want to do.
They simple just select the instance for instance actions create the AMI right.
Once that is done.
Once your data is safe one your work is safe in the AMI you can delete the server as well.
So in general throughout this course once you're done with a practice session you should remove resources so
that you don't have any cost so that you're not being billed for those resources.
So we go ahead and terminate the instance as well but just note that you should terminate the instance
only after the AMI has been successfully created by.
So make sure that the AMI is in an available state.
It should be in an available state.
If you delete the server too quickly then the AMI may not save on your data fully.
OK so this is something to be careful about.
And let's now see how to create the AMI.
So let's say this is our application.
This is our EC2 instance.
This has our PHP application deployed on it and we have verified that everything is working fine.
So all we have to do is select the server and from actions say image and then create image.
And then you can give this a name.
Let's say you have something like this.
AWS course PHP
AMI maybe.
Right.
And and then just say and then just say create image.
Right.
And this will create an image.
You can go to the AMI section here and you'll see an image is being created.
Right.
And this would take a while.
This would take maybe three minutes four minutes something like that.
And now and the state is pending right now in the state should change to available.
Right it's important that the state change to available.
And then you can go and terminate.
Right.
And then you can go and terminate the instance.
So.
So just make sure that you terminate the instance.
Yes.
But but only after the AMI is in an available state right this is how we're going to do it.
Now also remember the AMI also has a snapshot because the AMI is always backed by a snapshot.
So when you create an AMI at the same time you will notice that a snapshot is also being created.
Right.
And this is an eight G-B snapshot and this will cost you about 80 cents per month.
So if you store this AMI it will cost you about 80 cents per month which is not too much.
Right.
And and this AMI will be useful throughout the score.
So my recommendation is that you retain the AMI throughout this course and that you can remove this AMI as well
but in general you should definitely be deleting the resources.
so this server
Let's say we're done with it we don't need the server anymore.
Then you should definitely be terminating these as soon as possible because you can easily recreate
such resources at any at any time.
OK.
All right so let me just check on the AMI once again and see if it is available.
OK so this looks like it'll take some time.
But like I said just make sure that it's in an available state and only then go ahead and terminate
the instance.
OK.
From actions just say it in some state and then delete it.
All right.
OK.
So in this video we've seen how to create an AMI of a server which has our PHP application simply
select the instance from actions create an image and give it a good name and and then only when the
AMI is in an available state.
Then go ahead and terminate the instance.
OK.
So good luck with this task.
'[AWS] > Highly Available, Scalable, AWS Stack' 카테고리의 다른 글
8. Install MySQL server on EC2 instance (0) | 2022.01.18 |
---|---|
7. Intro: Fault tolerance - single instance architecture (0) | 2022.01.17 |
5. Deploy app on an EC2 instance (0) | 2022.01.17 |
4. Prerequisites: Launch an EC2 instance (0) | 2022.01.17 |
3. Intro : Deploy application (0) | 2022.01.17 |
댓글