[Music]
hello I'm Walter occult support engineer
here at the a SS offs in Cape Town
sometimes customers ask me how to move
an ec2 instance to another availability
zone or VPC I tell them to do this it's
necessary to create an Amazon machine
image and launch a new instance based on
this image in the desired availability
zone the same is true if you want to
move your instance between subnets even
if they are in the same availability
zone let me show you the steps using the
AWS console to create an army from an e
BSC back at Linux instance and launch it
on another availability zone using the
same LS KP address you can also create
an army using the AWS CLI or the Amazon
ec2 API s-- before proceeding with the
steps i would like to explain that the
amazon machine image is based on EBS
snapshots for large file systems without
a previous snapshot the ami creation can
take several hours to decrease the army
creation time I would recommend that you
create an IBS nap shot before creating
the army also if your instance has
instances tar volumes the ami creation
will not create a snapshot for these
volumes and you need to copy its data to
a new EBS volume or an external location
like Amazon s3 with that said let's get
started with the steps I'm a radula get
in on the AWS management console and now
we will open the ec2 console
on the Left navigation pin choose
instance
in our example we will move the
availability zone be instance located on
you central one be to use central 1a so
select the instance and select the
actions bottle instance date and stop
we stopped the instance to guarantee
file system data integrity the instance
is stopping may take a few moments as
the instance is de stop it select the
instance on the list and select actions
image create image give it a name our
example will be a case video example and
the scripture will be the same you can
issue the create image button
with the image ID we can monitor the
army creation so click on the meid
this is our army details page we can see
the status now is painting it is
painting because the EBS snapshots are
being generated and when it's completed
the am estate to be available now the
army status is available so select the
army and click on the top left blue
bottom lunch
select the same instance type that your
instant was running previously on this
example we will select the T to medium
and click on the configure instance
details now we are in the configure
instance details page this is the page
where we can select the destination VPC
availability zone and subnet so in our
case we will select the availability
zone you central 1a
and if you are instance it's a
production instance please enable the
termination protection policy to avoid
accidental termination and choose the
next to add a storage page you can keep
the storage page as is and click Next
again you can add a tag and give it a
name so the key will be named and the
value will be the name of our instance
so in our example it's a KC video
example and click on next on the
security group page select the same
security group that was applied to the
original instance in my case I will
select the default accessing security
group and I will select the default
security group please keep in mind that
security group is related to the V PC
and if you are moving our instance
between V pcs you need to create a new
security group on the destination V PC
allowing the same important protocols
now proceed to review and launch
if everything looks good launch the new
instance I will select my private keeper
and I will launch the instance
we can click on the instance ID to check
the instance status may take a few
moments
as the instance is on the running state
now if your previous instance has a
landscaping we can reassign it to the
new instance now so on the Left menu go
to Alaska piece we can see I have only
one L escapee and it's currently
attached to my previous instance so I
will select the IP I will select the
actions disassociates address I will
confirm and I will select actions again
and select the associate others on the
instance field I will put my new
instance name so it's the KC video
example I will select my private IP for
that particular instance and I wish you
the bottom associate
you can close the page now and if you
click on the instance ID
it will show us the instanceid details
and the landscape II attach it as ipv4 a
public IP thanks for watching and hepcat
computing from all of us here at AWS
[Music]
you
[Music]