• AWS EC2(Elastic Compute Cloud) – ok we need to start ec2, i think the last time, we demonstrated how you can create an ec2 instance.

in your account, correct, when you actually launch an instance.

  • actually when you launch an instance, you’ll get all these steps here
  • step 1, step 2, step 3, step 4, step 5, step 6, step 7
  • 7 steps are there and one by one you can select them
  • there is no need to record somewhere and
  • there is no need to record somewhere and
  • there is no need to record down somewhere
  • straight away when you open the dashboard
  • you can see all these steps
  • ok
  • now, its time to start the class
  • on aws ec2
  • what is ec2
  • ec2 i told you earlier
  • and ec2, basically the service you can use this service to create an virtual machine
  • and aws provide the virtual enviroment
  • where you can create an ec2 instance
  • and subsequently ec2 also
  • this service also provides option to select a configuration of instance
  • and we saw last time
  • in a quick steps, how we can create an ec2 instance
  • that i think you can easily create now
  • now its time to just study about

 

Components of EC2 Service

  • if you open ec2 dashboard,no of options are there
  • like images
  • elastic block store
  • network & security
  • load balancing
  • auto scaling
  • each of everything youll study one by one
  • step by step
  • correct
  • and i think you are ok with is now
  • so im creating again an instance
  • and during that provision
  • ill explain you about all these terms
  • right
  • when you launch an instance
  • this is the very first step
  • in the first step you see
  • AMI
  • what is an AMI
  • so its a template, its an image
  • its a operating system
  • ISO
  • what exactly this is
  • actually amazon machine image(AMI)
  • is a pre-defined configured templete
  • we know that to launch an instance
  • we do require an operating system image
  • without operating system definetly you cannot launch an instance
  • and we are working on virtual environment
  • and we cannot use ISO Images
  • because ISO images needs either the pen drives or DVD drive
  • we are working with virtual machines
  • so we cannot use these kind of drives aon virtual machines
  • and in AWS computing we create an instance
  • using templets of an instance
  • or AMI
  • so if you see
  • in the definition
  • in step 1
  • here itself written here
  • AMI is an template that contains the software configuration
  • operating system
  • application server
  • and applications
  • which required to launch your instance
  • everything is there on these same screen
  • no need to make your noted and all
  • only the thing you have to concentrate on what exactly you are learning
  • and by using AMI
  • of a machine
  • you can create number of similar instance in one go
  • AMI contains images of operating systems
  • such as linux
  • windows operating system
  • and we can explain the need of AMI
  • so the first AMI is required to launch the machine
  • i think this concept is clear
  • correct
  • and we can createAMI from that running machine
  • to we can use redimed AMI’s
  • and if you want to create your own AMI
  • that option is also available
  • and we will learn here how we can create your existing image
  • right
  • existing means if a machine contains a number of installed applications in that instance
  • AMI created from that instance will include all these settings
  • configuration
  • as well as applications
  • you have so when you create a new instance
  • using this AMI
  • youll find those applications that are available in that instance
  • and you can use AMI
  • from aws which are available in these four different types of options
  • we have
  • on AMI Page
  • if you see this AMI Page
  • we have quick start AMI’s
  • we have aws market place
  • we have community AMI
  • let me explain one by one
  • right now what you did
  • you selected the quick start
  • on the top
  • and in quick start
  • if you see
  • almost 41 AMIs are there
  • what is the meaning of this
  • only 41 AMI’s are there
  • dont you think it is very odd number
  • 41
  • ya and actually these are the most frequently used AMI’s
  • of various operating system
  • now they are segregated
  • they are available in
  • quick start option
  • if you scroll down
  • youll see all these 41
  • and these all 41 are not available for free tier eligible
  • some of them are free
  • some of them are paid bases
  • lets say first one is amazon linux
  • this is for free tier eligible
  • means you can use this image free of cost
  • but next second and theird these are mac operating systems AMI’s
  • they just inlcuded last month
  • earlier these AMI’s were not there
  • either selecting these AMI’s
  • you have to pay
  • for these AMI’s
  • as well as the upgraded AMI’s
  • susre linux
  • and we have windows operating systems AMI’s
  • we have deep learning AMI’s
  • all these AMI’s
  • in these catagory
  • we have deep learning AMI’s
  • All these AMI’s in this category are most frequently use AMI’s
  • it depend what AMI you are using for your machine
  • correct
  • machine means ec2 instance
  • so this is the first thing
  • next is
  • your my AMI
  • one more thing that i just want to tell you
  • because right now im not telling because
  • the thing is not yet cleared
  • lets say if you are just seeing this the detail under here
  • like do you read it
  • so in these
  • like do you read it
  • so in these
  • they are saying that the root device of the machine you create if you use this AMI
  • to create your ec2 instance
  • youll get EBS volume with this AMI
  • and with this machine
  • and virtualization type is hardware virtualization
  • and ENA is basically the network interface card
  • and you;; have ENA Enabled
  • enhance network adapter
  • so all these things are all given here
  • if you are selecting this AMI
  • what exactly you are getting with your ec2 instance
  • and not only this
  • if you are selecting this AMI
  • what exactly this AMI Contains
  • the story is written here
  • the complete information is written here
  • lets say this AMI Linux 2 comes with the five years support
  • it provides linux kernal 4.14 tuned
  • for optimal performance
  • what exactly it is containing
  • everything is written here
  • correct
  • now
  • if you go furthur, if you see another one
  • the same sort of things are there
  • EBS,hvm & ENF
  • is a network interface
  • now these days all machines we have ENA capability
  • means we have enhave network adapter
  • i was showing you that
  • if you click on my AMI option here
  • you see here the AMI you have
  • in your account if you are using it very first time
  • if you didnt create any AMI
  • you dont see anything
  • its normally blank
  • but  in my case, i have my own AMI
  • i created on AMI
  • thats why i can see my AMI
  • so what im saying if you need , you can create your own AMI
  • and this is a good thing because in AWS
  • AMI repository you have only redimed AMI’s
  • and redimed AMI’s are not configured for your infrastructure
  • to distribute to create more machine
  • the first of fall you should create a machine
  • then youll configure a machine
  • and if you think that the machine is ready to deploy
  • machine is ready to raplicate
  • so you can use this option to create, create my AMI
  • so if you create on my AMI
  • you are create image will appear here
  • so my AMI is clear

Next Is Marketplace

  • please do understand
  • that in this catogory you have more than 4000
  • more than 4000
  • nearly 5000 AMI are available
  • actually vendor provide their customized
  • customized or product AMI
  • and you can search any you can purchase them
  • you can search number of developer tools, business software’s
  • and software infrastructure AMI here
  • and we have long list of AMI’s
  • right
  • so elet say i have no idea
  • that if you want create oracle instance
  • or sap instance
  • from where youll get AMI’s
  • so this is the option available you have
  • you have aws market place
  • if you just go there
  • so if you are selecting sap AMI
  • and hit enter
  • simple write sap, youll see sap AMI’s here
  • lets say im just interested in oracle
  • i dont know what we have in oracle part
  • these are the AMI’s
  • so you can select
  • one of them as per your requirement
  • as per your project requirement
  • but in order to understand
  • which one is best for you
  • what youll do
  • lets say im just taking, the wordpress
  • wordpress
  • let me take word press
  • this is very common everyone can understand
  • and now hit enter
  • so if you see
  • this is the AMI
  • which is free eligible
  • but if you need to understand about this AMI
  • what exactly this AMI Contains
  • you can just expand this detail
  • and everythig is written about
  • what this AMI Contains
  • and what is the templete of this AMI
  • what default you are getting
  • lets say Im Interested in docker server
  • you just write docker
  • youll find docker
  • right
  • so windows docker
  • linux docker
  • depend on your project
  • so docker ubuntu
  • amazon EC-optimized amazon linux AMI
  • and this way you have number of machines
  • on docker
  • we have docker on centos 7
  • we have docker on RHH
  • even we have fortinet
  • this is basically the firewall kind of actually the AMI you have
  • and if you know
  • how to configure fortinet, you can use this image
  • so this way more than 4000 images we have
  • not only this one more thing just need to tell you
  • but later on
  • number of things are there in this ec2
  • ec2 service
  • which is quite important
  • ill definitely take longer time to complete this service
  • and ec2
  • offcourse if one service but
  • i think will take two or three classes to complete
  • i think that wont imapct your training
  • but this is very important to understand
  • AWS Platform
  • next is community AMI
  • right
  • how would you know which AMI to use
  • great question
  • probably you are working on
  • some project in your office
  • in your company
  • and the company will tell you
  • what exactly the features you are looking
  • in a machine
  • and those features should be there in AMI
  • in order to understand either
  • you must have some experience
  • which AMI is ok
  • or otherwise
  • you have to go and you have to see
  • lets say im interested in
  • to just place one
  • server linux server
  • with docker
  • right
  • so if you are saying
  • this is the first quick start
  • and you click the quick start
  • and do you find some docker here
  • lets say do you find anything related to docker
  • in these three lines
  • yes or no
  • no of course no
  • ok or you can write here
  • linux docker
  • that you need to search
  • right
  • so in this quick start catogory
  • we dont have any redimed docker image
  • so what youll do
  • youll go in market place
  • and write linux
  • amazon linux ofcourse, im looking for amazon
  • so you can narrow down your search
  • amazon linux docker
  • enter
  • see do we have
  • ya
  • we have
  • so this is the amazon linux
  • with docker and docker compose
  • and this is avaialable free of cost
  • so you can take this
  • ok now if it is written in free tier eligible
  • you have not to pay anything to aws
  • but in case if it is not written here
  • this is not free eligible

then you have search to what amount , aws will charge

  • like in this case
  • the price is very clear
  • in this case the price is very clear
  • even in this case the price is very clear
  • here this is the price
  • is written here
  • so almost in every AMI
  • they are writing about the prices
  • and this price is additional
  • if you place the machine
  • AMI has separate cost and
  • compute resources has some separate cost
  • like Configuration of the machine has
  • Separate cost
  • So Right now.
  • so this is the way you Can Search
  • which AMI is useful machine
  • Or you required to launch a machine
  • by the way
  • the third is community AMI
  • In this particular Resource.
  • you Can find number of popular
  • and
  • the popular and community
  • Resources
  • like Amazon Linux
  • Cent os
  • Debian
  • fedora
  • Gentoo
  • all these are operating
  • System fenders
  • and if you want to search down.
  • If you want to search on the basis of
  • name
  • you can just simply click on this.
  • and you can find AMI’s
  • Let’s say I’m Interested in Amazon Linux
  • you just select this option,
  • you’ll have all these amazon Linux
  • next, is what architecture you.
  • are looking for
  • are you looking for 32 bit
  • are you looking for 64 bit
  • intel based architecture
  • and 64 ARM
  • and 64 Mac based
  • So, let Me Choose like 64
  • 64 bit (x86)
  • we should have some idea about
  • architecture of Machine hardware
  • so If you dont have
  • I think your team will inform you
  • which aretitecture is more suitable,
  • and in almost in maximum cases.
  • Either you are taking 64 bit (x86)
  • or 32 – bit
  • these days actually we are not
  • using 32 bit machines.
  • we are using 64 bit Machines
  • and this Arm & the mac also
  • is also platform,
  • a hardware platform
  • So this is most suitable platform,
  • using these days 64-bit (x86)
  • Even though all these platforms
  • are available
  • depend what platform you want
  • to use.
  • You can discuss with you team
  • Correct
  • so Everything One person cannot
  • Come to know that
  • what exactly is there.
  • and the third thing,
  • the third option. In this Catogory
  • in this Catogory
  • this option was not there.
  • in other Catogory like It way
  • not there in quick Start
  • or Aws market place.
  • but in community AMI
  • If you are selecting any instance,
  • from here.
  • Or Instance type from here
  • like Amazon Machine image
  • you are selecting from here
  • So you have an option select an.
  • operating System
  • you have an option to select
  • architecture of this ec2 Instance
  • and third
  • what kind of root volume you
  • want
  • connect with your ec2 instance
  • normally you see EBS Volume
  • but we have instance store also
  • I’ll explain you
  • I’m ebs
  • So we have an instance to go
  • ebs volume is a hard disk kind of
  • thing
  • which Can Connect with ec2
  • Instance,
  • which work like an hardisk
  • I explained you In my last lecture
  • but we have Instance Store also
  • but if you taken Instance Store
  • You cannot take,
  • data permanently In this
  • if you Reboot your Machine
  • If you stop your machine
  • whatever Information
  • whatever the data is stored
  • In the machine
  • that will be lost.
  • Right, so you cannot store your data
  • permenently
  • So this is a temporary Volume
  • off conse this will Run
  • if you Start every thing is there
  • your operating System is there
  • using this AMI
  • whatever. All you are using but
  • instance store
  • normally people are using for.
  • less cost
  • Correct
  • but the one thing is there
  • If you want to store data in this
  • ec2 Instance Store
  • that One possible
  • So EBS is good
  • EBS is good
  • but if you are working with
  • large number of machines
  • Lets say if you have one thousand
  • or two thousand machine
  • in your environment
  • and you have some central Storage for your
  • applications
  • you never use EBS volume to share application
  • so these instance store will only use to cache your memory
  • or the temporary data can be stored over
  • there it is only available while the machine is available
  • while machine is running
  • when you reboot your machine
  • when you stop your machine
  • whatever information
  • whatever data was stored in this temporary volume
  • so this is not recommended if you are planning to store your data on your EBS volume
  • so if you are planning to store data in a root volume
  • EBS is the right option
  • so this is again but this feature is only available in this community
  • AMI’s
  • so from here lets say
  • in the only EBS will support
  • let me tell you
  • like in this if you are selecting this EC2 AMI
  • only EBS will support, there right
  • here EBS will support
  • scroll down scroll down
  • if you are choosing, let me choose instance store here
  • youll find instance store based AMI
  • i dont have ok
  • so in Amazon linux, its not available
  • let me try in Red Hat
  • is it there or not
  • no
  • we dont have
  • so very few machines has this options available
  • other linux
  • we dont have
  • ok, ok
  • let me choose Amazon linux once again
  • ya
  • now, you can see the instance store here
  • you can see very clearly
  • if you are selecting
  • if you are selecting this particular AMI
  • if you are selecting this particular AMI
  • you have root device type instance store
  • instead of EBS
  • instead of EBS
  • so EBS is standard
  • but the instance store if you want to
  • use as a root volume that option is also available
  • and for that you have to use community AMI
  • is it clear
  • this is very important vital information im giving you
  • ok
  • so im going you one simple example, lets say im selecting the first one
  • you just go there
  • but one more thing is there so such kind of instance store
  • are not available under free tier eligible
  • please do understand
  • ok
  • if you want to use instance store
  • roots volumes
  • so this feature is not available under free tier eligible
  • you can very clearly see all these free tier eligible
  • and these low configuration machines are dehighlighted
  • you cannot select
  • these machines
  • only the machine you have
  • you have the machines
  • better configuration
  • lets say you have cl.medium
  • or cl.xlarge
  • let me take one and just, i just proceed
  • just click on configuration instance detail
  • let it be as it is
  • 3rd step im not making any change
  • and if you are just going here
  • you have all these volumes
  • lets say you have four volumes here
  • and you are interested in only one volume
  • so you can delete all these volumes
  • and you see
  • the size of this volume is fixed
  • you cannot change the size of the volume
  • because it is the instance store
  • and you have only the instance store
  • option available on with this instance type
  • and this is the device
  • this is the name of the device
  • and the snapshot is not applicable
  • as i already told you
  • you cannot create a snapshot
  • you cannot actually restore data from these kind of EC2
  • volume type
  • because if you restart these machines
  • if you stop & start these machines that wont allow to actually store data on these
  • so these are the basically the temporary volumes
  • and youc an only store some temporary data like
  • cache and cookies such kind of things you can use here
  • and this is you have
  • and the volume type is
  • HDD
  • and 10ps also not existable
  • and throughput also not adjustable
  • but the size 420 GB is fixed
  • so we are not taking all these stuff here
  • so i was just explaining the things are there
  • in community AMI
  • correct
  • so because you are using actually AMI for free so this is the option
  • we are using quick start
  • in this youll get the most frequently
  • used AMI’s
  • of various operating systems
  • so i think the information about AMI is ok
  • now the next thing is
  • how youll create your own AMI
  • how youll create your own AMI
  • and for the you must have a machine
  • correct
  • yes or no
  • through machine you can create your own AMI
  • through your own machine
  • you can create your own AMI
  • and whatever the machine configuration you have
  • whatever the machine setting
  • whatever the machine has applications that also included in AMI
  • so whatever the state of the machine
  • you have at that particular point of time
  • everything will be taken in AMI
  • so what im doing
  • im going back
  • im going back
  • to EC2 dashboard
  • and right now we have a machine
  • and im explaining you how you can create your machine
  • i have a machine
  • i can do one thing
  • let me delete it because i think
  • this is not a right machine i think
  • this was created
  • through some elastic bean stalk so i have no idea
  • what exactly is there in this machine
  • so what im doing im creating launch instance
  • but this time im using my synechron apache server
  • we have so this is the server
  • we have
  • this is already configured
  • right, so or you can take the first one(quick start->amazon linux 2 AMI(HUM))
  • let me tell you how the things will work
  • iim taking the first AMI
  • linux AMI
  • this AMI is totally blank
  • this is the linux AMI
  • and this is the very first AMI
  • if you install any machine
  • if you launch any machine
  • through this AMI
  • the machine is very new
  • there is no pre-configured
  • there is no application we have
  • so first of all we have to configure
  • your machine as per the project requirement
  • so youll open this machine
  • youll configure this machine
  • youll update this machine
  • youll include some packages in it
  • and youll do some configuration a
  • and later on
  • one you feel that your machine is now
  • ready
  • to launch
  • then you can use this machine to create new AMI
  • now what i can do
  • i can share that AMI
  • with other AWS account holders even
  • and i can copy that AMI
  • from one region to another region
  • ill tell you
  • you please see here
  • just give a second ill tell you what you can do with AMI’s
  • just a minute
  • you please let me know are you getting me
  • are you getting what im teaching
  • ok good
  • so this is your board
  • and im teaching you here
  • what is an AMI
  • lets say
  • you are creating an machine
  • so configuration of the machine doesn’t contain an AMI
  • AMI is only a template of an operating system
  • it dosnt contain any configuration related to ec2 instance
  • so at the time of the launch of the machine
  • you can select instance type
  • the configuration of the machine
  • nobody is forcing to use the same configuration
  • as you had in your machine
  • you have used to create AMI
  • ok lets say
  • lets say
  • this is the AMI
  • so lets say i have Amazon linux AMI
  • and this was available in the list of AMI’s
  • right
  • so you are using this Amazon linux AMI
  • to create EC2 Instance
  • so once the ec2 instance is launched
  • you have launched ec2 instance using this amazon linux AMI
  • but this ec2 instance is exactly
  • absolutely new
  • its freash
  • yes or no
  • so what youll do
  • youll configure this machine
  • yourll configure
  • this machine
  • this instance
  • you may update packages
  • you may update packages
  • you may launch some application
  • launch aplication in this machine
  • so you are making this ec2 instance project ready
  • you are configuring this ec2 instance
  • for your project
  • earlier this ec2 instance was fresh
  • absolutely fresh
  • when you launch this machine
  • this idea is clear
  • so this is the next step
  • the first step the launch was done
  • next step you can configure this machine
  • now once the machine is configured
  • one the machine is ready to publish your application
  • once you see everything is ok
  • now you’ll use this machine to create AMI
  • now you can create AMI
  • now creating AMI
  • and if you are in
  • lets say your machine are in
  • north virginia
  • what is north virginia
  • region
  • lets say your machine was in north virginia and now your machine is ready
  • and if you are making any AMI using this launched machine
  • in which region by default
  • this onfiguration , this AMI is available
  • offcourse in north virginia
  • right
  • or you can say the code is US-east-1
  • this is the code of north virginia
  • and you have a new AMI
  • this is your AMI
  • this is your AMI
  • and you can find this AMI in my AMI’s
  • right
  • and once you have an AMI
  • what you can do
  • number 1
  • the task is using this AMI
  • you can create a new machine
  • new ec2 instance
  • ec2 instance, in the same way region
  • number 1
  • number 2 you can copy
  • this AMI
  • to another region
  • another region
  • and one more thing
  • you can share this AMI
  • you can share the AMI
  • on either public platform
  • public platform or share with another aws account holders
  • another aws account holders
  • i think the purpose is clear or not
  • so what you can do
  • you can do these three tasks
  • number 1 either using this AMI
  • if you want to launch a new machine
  • you can launch
  • number of similar machines
  • number of similar machines
  • number 2, if you want to copy
  • from one region to another region
  • definetly you can copy the same AMI
  • from one region to another region
  • third if you want to share
  • this AMI with your team members
  • working on some different AWS accounts
  • even we have an option to share this AMI with some different account holders
  • aws account holders
  • ok
  • let me clear you once again
  • what i did here
  • you please see number 1
  • very first
  • you had this AMI
  • you had standard amazon linux AMI with you
  • and you have used this AMI to create one EC2 instance
  • and this EC2 instance was fresh
  • first of all you configure this EC2 instance
  • may be you are configuring this instance
  • you are updating packages
  • you are launching some applications
  • so you are making this machine the project ready
  • and once this machine is configured
  • once you feel that the machine is 100% ok tested
  • it is working fine , you can use this machine to create, now a new AMI
  • so this is here
  • we have a new AMI
  • now
  • let me clear
  • let me clear
  • now once you create this AMI
  • so this AMI
  • will use the same
  • will use the same region
  • in which your machine are
  • right
  • lets say your machine was in north virginia
  • and you are creating AMI
  • so automatically this AMI is available in
  • US-east 1 which is north virginia
  • now once you have AMI
  • what you can do with AMI
  • number 1
  • you can use the new EC2 instances using AMI
  • number 2
  • if you want to copy this AMI from once region to another region
  • definetly you can do
  • may be you want to create similar machine in different region
  • so right now you are in North virginia
  • and you want to create similar machine
  • lets say in mumbai
  • lets say in ohio
  • so what youll do youll copy this AMI to another region first
  • and then you can use later on
  • and third is
  • you can share theAMI
  • either to share on this public platform
  • or if you want to share this AMI With
  • another AWS account holders
  • so these are the things
  • yes, once you have set up your AMI
  • you have an option to share
  • yes
  • are you ok with this
  • on the top of AMI applications are installed
  • yes
  • we are not installing AMI’s in
  • we are not installing applications in AMI’s
  • we are installing Applications in machines
  • and we are using machines to create AMI
  • that i already explained
  • just we wanted to know
  • for example after created my own customized AMI, ok
  • whatever the configuration i need ok
  • can i have option to edit like
  • can i change my password
  • change the different configuration
  • for the customized AMI is there any option
  • ya,ya,ya everything is there
  • ill tell you the knowledge is the base ill tell you
  • because AWS is so good
  • everything is possible, even you can update your AMI
  • these days people are using CICD pipeline
  • and in that day use actually kind of things
  • even not an issue
  • ill tell teach you means how you can update AMI’s
  • we have an option here
  • but this is first level option
  • right now we are not taking this question
  • but definitely the question is there we can update it
  • right, yeah, yes
  • now, i gonna take 3 labs here
  • this was the way that i just explained you
  • what is your AMI
  • so you had this redimed AMI
  • Linux AMI
  • and you have used this AMI to create a new AMI
  • and this new AMI, includes your updated operating system
  • your applications
  • your configuration
  • may be youll had some data
  • that you had copied in this instance
  • will also included in this AMI
  • right
  • now, lets start one by one
  • first of all what im doing
  • just give me one second
  • what im doing here
  • i think one thing is very clear with you people
  • you can search image
  • if somebody is asking to search an image for your need
  • can you search an image
  • yes orno
  • right
  • ok so first of all
  • im taking lab activity
  • so what ill do first of all you have launched instance
  • instance
  • then youll configure instance
  • third youll create a new AMI
  • in the same region
  • so actually the region have you selected the region
  • when you launch the instance
  • lets say i was in north virginia
  • and youll create here, AMI in north virginia
  • and once the AMI you have
  • once the AMI you have
  • now
  • what you can do
  • you can do three things
  • i already explained you
  • number 1 you can create a new instance
  • you can copy the AMI to another region
  • so creator
  • creating a new instance
  • using the AMI, right
  • five what you can do
  • you can copy
  • copy the image
  • in a new or another region
  • so youll learn how to copy
  • the image
  • from one region to another region
  • right
  • because may be machine is in north virginia
  • and you are also interested
  • to create a similar kind of machine
  • lets say in ohio
  • so what youll do
  • the machine cannot be copied to one region to another region
  • machine cannot be copied
  • so machine is using your compute resources
  • machine cannot be copied
  • so machine is using your compute resources
  • machine cannot be copied
  • and machine has multiple components
  • EBS volume and this machine is ready to use in a particular region
  • so machine cannot be copied from one region to another region
  • so what youll do so this machine has one AMI
  • so you are using this machine
  • so you are using this AMI to create this machine
  • so what youll do so youll copy this AMI
  • from one region
  • lets say region 1
  • to region 2
  • right
  • and once the image is copied
  • youll use this image to create
  • a new ec2 instance in ohio region or another region or another region
  • it is clear
  • so youll learn here
  • this activity
  • yes
  • one customized AMI will support
  • who project
  • and second is
  • the sixth option im telling you
  • lets say
  • my team member are working on different AWS account
  • and they want me to share the AMI with them
  • so they want to save time
  • so they do not want to repeat the same excercise
  • at their on their aws account
  • they do not want to create a new EC2 AMI
  • so what iam doing
  • as a project lead, i had actually this opportunity to create AMI
  • now, once i have AMI for that project what ill do
  • ill share this particular AMI with my team members
  • so youll learn here
  • the sharing, the AMI with another AWS a/c owners or holders
  • right
  • so these things youll see how you can do
  • all thse things practically
  • will it work
  • AMI’s are just images
  • AMI’s cannot communicate each other
  • AMI’s are not machines
  • AMI’s are the templete of operating system
  • you use AMI’s to create EC2 instance
  • to create EC2 instances
  • if you want to talk to another machine
  • you need EC2 instances
  • not AMI
  • ok
  • so these are the things
  • we will do one by one
  • please let me know
  • are you clear with this
  • the steps of this lab
  • ok

ON EC2 PAGE

  • so first of all you just confirm
  • you just confirm you are creating an instances
  • click on instance
  • you are selecting linux image
  • you are using t2.micro
  • because this configuration is available
  • free of cost
  • im taking t2.micro
  • click on next
  • and you are on third step
  • in this step you are selecting
  • how many number of instances are required
  • which network you are using
  • so this is the VPC, default VPC im taking right
  • youll have only default VPC even in your account
  • and these are number of availability zones you have
  • in north virginia we have 6 availability zones
  • im selecting one availability zone to launch my machine
  • US-East la
  • and you want to
  • actually provide the public IP address
  • to this machine
  • yes or no (enable or disable)
  • that thing you can configure rom here
  • so i need to enable my public ip address to my ec2 instance
  • so this setting should be enabled
  • other wise you wont be able to take remote of this machine
  • to configure it
  • ok soo go and next
  • so this is an ebs based ec2 machine
  • this its your root volume
  • and the root volume
  • and the root volume size is
  • 8 gb
  • so you can take maximum upto 30 GB
  • because you are using free tier eligible
  • now
  • click on next
  • this is your tag
  • you can provide the name to the machine
  • lets say im providing
  • my instance
  • im wiriting
  • this is my linux instance
  • and click on next
  • this is the security
  • what is the security group
  • security group is a kind of firewall
  • so im opening
  • this the protocol
  • so port no 22 is open to take the remote of this machine
  • because this is a linux machine and if you want to add a rule
  • so let me take port number 80 for http
  • and you can access it from anywhere
  • so thats why you are taking anywhere
  • ya
  • right
  • only these two things are there im just configuring only
  • im opening two ports
  • one is SSH and another is HTTP
  • now review and launch
  • click on review and launch
  • and this is launch
  • and here if you want to create a new key pair
  • you are ok
  • you just write sai charan paloju
  • and today is April
  • its saicharanpaloju02april
  • and just download the key pair
  • you have the key pair
  • in pem format
  • now finally you launch the instance
  • once you launch the instance
  • now you can view the instance
  • you can view the instance
  • and this is the instance being launched
  • once the machine is launched
  • you can take its remote
  • configure it as per your required
  • as i explained you earlier
  • because once the machine is launched what youll  do
  • youll configure this machine
  • for your project
  • yes or no
  • yes
  • so once the machine is prepared
  • once the machine is ready
  • what youll do
  • youll just go to connect
  • first select the machine
  • now click on connect
  • and youll select this ec2 instance
  • connect option
  • and now finally you connect it
  • right
  • so you took the machines remote
  • very successfully
  • so without any effort
  • now youll configure this machine
  • in order to configure the machine
  • first of all im switching myself to the root use
  • sudo su –
  • and press enter
  • now you can see that you are in root froant
  • you write here
  • who ami
  • it will tell you that you are root
  • where exactly you are in the root enter(pwd)-> press enter
  • inverted root restructured
  • so you are in the root directory
  • right now
  • so first of all i need to update
  • my operating system here
  • correct
  • i need to update my opearting system
  • in order to update my operating system
  • so youll run
  • yum install
  • so normally youll use username & password to login in to your machine
  • but in aws
  • we are not using password
  • instead of password
  • we are using this cryptographic keys
  • so we are creating an keys
  • so through these keys
  • we are logging to our machines
  • right
  • so instead of password we are using key pair
  • is it clear
  • so yum install or you can say
  • you can update your package
  • yum update – click eneter
  • so this way you can update your operating system you have
  • so say yes
  • press y
  • to continue
  • so you are updating your existing linux operating system you have
  • so you successfully updated your operating system
  • number 1
  • number 2
  • lets say you want to install
  • httpd package
  • right
  • you just do write
  • youm install httpd-y
  • press enter
  • so httpd package is installed
  • ok
  • ok
  • now you run a command service httpd start
  • this way you are starting the service
  • this way you are starting the service
  • you started the servcie
  • service httpd start
  • correct
  • next is “
  • once it is started
  • youll run a command
  • chkconfig httpd on
  • what is the purpose of this command
  • the purpose of this command is to make your service always on
  • when you are restarting your machine
  • even if you are restoring your machine
  • the status of this http will remain on always
  • other wise it automatically stops
  • so in oder to just make it on
  • for next restart
  • to run this command
  • chkconfig httpd on
  • right
  • so these are the configurations we are doing
  • so we are in the middle of the configuration we have
  • what is yum
  • i think you are new for the linux
  • right
  • yum is a actually tool in linux
  • spectually in red hat linux
  • as well as in amazon linux
  • you can use yum to manage your packages
  • you can install packages
  • you can remove packages
  • you can update packages
  • so in order to run website in your machine
  • in linux instance
  • you must have httpd package installed in your machine
  • you must have in your machine
  • you must have httpd package
  • so earlier we had no package in this
  • so that why i used
  • yum install httpd
  • correct
  • and this is the history
  • so let me tell you
  • this is the history if the command
  • so as of now
  • we used these much of commands
  • so what im doing
  • im just pasting all these commands in check
  • you can use it
  • use that
  • i think you can see
  • this is not only for you fore everyone
  • is ti clear

COMMANDS

yum update (updating os)

yum install httpd

service httpd start

checkconfig httpd on

history

 

  • so my machine is configured
  • for httpd
  • but the index html file is not there
  • it means that we do not have any package in it
  • we do not have any website in it
  • we do not have any application in it
  • right
  • so right now im not telling you
  • how you can upload that application in to this ec2 instance
  • because that again require some number of steps
  • which are not yet covered
  • so what im doing
  • im just creating one index.html file
  • right
  • as an application
  • will it work
  • so first of all you just change the directory
  • “cd/var/www/html/” – command
  • you should be in var    www/html
  • on order to configure
  • index.html
  • so this is the
  • this is the path
  • exactly the httpd server
  • is using
  • that why you changed the directory
  • so once you changed the directory
  • now you can see
  • you are in var/www/html directory
  • and if you see
  • this directory is totally blank
  • “ls-l” (type this press enter)
  • this was the list command ls – l
  • so this directory doesnt contain any file or any application
  • for any website
  • correct or not
  • now
  • im creating very simmple index.html file
  • which contains only one line  cotent
  • so is there any input from
  • from your side what command i should choose to create index.html file
  • ya this is inbuilt directory
  • actually when you install
  • when you install httpd package
  • it will appear automatically
  • it will manage by linux by itself
  • right
  • so im using “echo” command im wiriting “echo” this is my first managed server on april 2021
  • this is the line i did write
  • now i want to tranfer
  • this line
  • now i want to tranfer
  • for transfer im using greater than sign
  • and then you have to write the name of the file you want to create
  • index.html
  • ech” this is my first managed server 04 april 2021″> index.html
  • there should be any mistake
  • the reason is very clear
  • linux is case sensitive
  • the people who are new for this linux
  • for this operating system
  • this information is for them
  • right
  • so hit enter
  • and these were the command
  • so again im putting history
  • and again from the begginning
  • till here im just copying all these commands
  • right
  • i think from here till here
  • there are ok
  • and im pasting
  • so these commands are im pasted now
  • is it clear everyone
  • now you have commands
  • so remove this line number 17,18,19
  • so these were the actually line numbers
  • so you can remove
  • pwd is the command
  • ls -l is command
  • then the command starts from echo
  • so you please remove these commands
  • sorry these numbers
  • these numbers are not the part of these commands
  • right
  • so according to this configuration
  • you did here
  • here machine is ready
  • as a simple web server
  • which have index.html to publish
  • now its the time to verify whether the machine is working
  • is working
  • that the application is working on this machine
  • youll go back
  • to ec2 dashboard
  • this was the machine
  • yes or no
  • my instance
  • this was the machine
  • and this machine has both
  • public as well as private ip address
  • so this is the public ip address of the machine and this is the private ip address of this machine
  • and this machine is using a security group
  • in security group we opened port number 80
  • as well as the port number 22
  • you know the port number 22 is used
  • for to take remote of this machine
  • because you are using linux operating system on it
  • and port number 80 is to publish web pages or web content
  • so what youll do click on details again
  • copy the public ip address
  • this is the public ip address of my ec2 instance
  • you open browser
  • in your computer
  • and hit this ip address
  • and see what happends
  • and let me know
  • what did you see
  • i shared an ip address here
  • this is an ip address of my web server
  • you open one browser in your computer
  • and type this
  • yes
  • its showing blank screen
  • let me see, let me see
  • ya, its a blank really
  • you are correct, its a blank
  • let me see
  • typing “pwd” – click enter
  • typing “ls – l” click enter
  • typing “service.httpd status” – click enter
  • no its working
  • index.html
  • everything is ok
  • perfect, everything is perfect
  • from my end
  • right
  • and this also is working fine
  • if you see
  • typing ls – l click enter
  • this is good
  • index.html
  • there should not be any spelling mistake here
  • and even apache http server is working
  • you can see in green color
  • so this was a command to check the status of my service
  • command is ” service httpd status”
  • this is running
  • and you have this index.html
  • and in order to actually publish this web page on internet
  • if you see the port number 80
  • is also open
  • ok
  • so i think protocol should be, let me
  • check once again
  • is there any oprtion to
  • just see
  • the things were correct or not
  • i think everything is ok
  • nothing is wrong
  • according to everything is ok
  • ok
  • so let me check once again
  • why it is not working
  • you go to ec2 dashboard
  • open and select the machine
  • and this is the public ip address
  • no need to go into much detail
  • this is very simple
  • so what im doing
  • im restarting the machine
  • it happens sometimes right you select the machine
  • and ok
  • im stopping the machine
  • if you stop the machine and start the machine
  • what will happen
  • the public ip address of this machine will change
  • right now, you see
  • public ip address of this machine is
  • 54.157.121.192
  • right
  • so if you restart the machine
  • if you restart the machine
  • if you started the machine again
  • and the machine is failed to start something is wrong
  • why because the machine status
  • is not yet clear
  • now the machine is stopping
  • it is taking time to stop the machine
  • so let me see
  • once it is properly stopped
  • then only you can start the machine and you please run all these commands
  • yes, definetly
  • it works, very simple
  • very simple, configuration i did here
  • right
  • just a minute
  • there is something is wrong here actually
  • now with platform
  • i dont know im facing some delay here
  • it doesnt take much time to stop
  • when you take its remote
  • i think i should answer
  • to you that the what username should be taken
  • if you are taking the SSH control using aws based browser
  • or SSH browser
  • so the machine has been stopped
  • now start the instance
  • now the instance has been started
  • this action has taken
  • right
  • and youll see the ip address of the machine will change
  • and now the ip address of this machine has been changed
  • i restarted the machine
  • right
  • not an issue
  • the machine is running
  • this is really great
  • the machine is running
  • and this time im
  • there is something really very fishy
  • why it is not coming
  • let me check
  • im taking remote again
  • you selected the machine
  • connect it
  • while you connected it is uding
  • which username
  • can you see it
  • the username
  • what username is being used here
  • ec2-user
  • right very good
  • now you connected with the machine
  • and let me check
  • the content was poied or not
  • in that index.html
  • so what im doing
  • first of all “sudo su-” click enter
  • “clear”-click enter
  • cd/var/www/html/ – and click enter
  • “ls -l” and click enter(this is the file you had)
  • (index.html)
  • and this file has no content saved
  • (at index.html-> click enter
  • thats why its blank
  • i use that
  • echo”this is my web server 4 april 2021″>index.html
  • you are tranfferred it to index.html
  • early it was not saved
  • i dont know, i skipped some enter
  • “ls -l” enter
  • if you list this index.html again
  • now you can see this time we have 38 bits
  • now if you go to the browser and refresh the page where you put public IP on web address bar
  • youll find the answer
  • and this is really we started the machine
  • everything was correct
  • right
  • now
  • it is not required
  • you have not to write actually index.html
  • you have to write only the IP Address of the machine
  • and automatically it will take index.html
  • right now it will work
  • so it is working for me, it will work for you even
  • so if im sharing the IP Address you people once again
  • just confirm me that the machine is working properly
  • and you can see this machine is working properly
  • right or wrong
  • correct its working
  • so my machine is ready
  • so my machine is configured
  • my machine is configured
  • for my project
  • my machine is ready
  • now my machine has packages installed in it
  • now my machine has
  • lets say we are considering that
  • we have one application in it
  • one website application in it
  • we are assuming that because we just created index.html
  • right
  • so i am not taking very heavy application right now
  • here at this stage
  • so here once the machine is ready
  • now you can use this running machine
  • to create a new AMI

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *