[Music]
hi I'm Satya a plot so pre engineer here
at the arrow bless Sydney office
sometimes customers ask me how they can
use the arrow less CLI to port from a
multi-part misses upload of a large file
to an Amazon s3 bucket
I tell them multi-part message upload to
an Amazon s3 bucket is a straightforward
process let me walk you through the
process
okay so login to your Mac OS Linux or
Windows client in this example I'll be
using Mac OS client be sure that your
arrow bless CLI is configured properly
instructions on how to install a delay
CLI is available on the link here now
look at the large file that you want to
upload to an s3 as a multi-part message
and then we'll have to obtain base64 md5
checksum of the original file so as you
can see I'm already in my data directory
so if I just go LS - I'll head you can
see I have this original file this file
is 27 megabytes as you can see here now
I'm gonna retrieve the base64 md5
checksum value for this file and for
that I'm going to use the command md5
binary
by 64 so not down this value here
because we'll be using this value later
on so I'm going to copy this one and
then I'm gonna just place it in one of
my text file so here this value 8 you
can see on the screen which I have
pasted in this text for document that is
the md5 checksum value so we're gonna be
keeping it here for later
now going back to terminal let's split
the original file and for that I'm gonna
run split and then I'm gonna be
splitting the files into 10 megabyte
chunk and that's the file and renaming
it with prefix of part file - so the
original file which was 27 MB have have
now been splitted so if I go Alice -
Alice you can see the splitted file so
the first-to-file are 10 megabytes and
the filenames are part file that's a a
and then pardes file that's a B and a C
so the last file is 6.3 MB now get the
base64 md5 checksum of all the splitted
files for that I'm gonna be running
another command very similar to the
earlier command on SSL md5 binary so I'm
gonna go for the first file and then
this
sixty-four year
and they're not on this value for later
use so I'm gonna do the same thing for
all the files and then I'm gonna record
these values a B and a C and then I'm
gonna be recording this file again all
these values in my text file so all
these md5 checksums values will need it
later and when completing the multi-part
messes up load that's why we have to
save it for later in a text file
okay now retrieve the unique upload ID
value that associates the original file
with the file parts and for that we're
gonna be running this command so I have
command here so it always s3 API and
then we're gonna create multi-part
upload the bucket for this where the
upload is gonna go is so clear that
that's taste and the key is always no
file that that that is the big file that
we saw earlier which was 27 MB and the
metadata here is the md5 checksum value
that we retrieved earlier and you can
see the text here so that's the md5
value 1 hit enter here
so in this output we will need to store
this upload ID value so this upload ID
value will need it when we have this
multi-part uploaded successfully later
on so I'm going to save this in the text
file
now once you have that upload ID we need
to upload the file parts to s3 bucket by
running this command so I have
constructed a command here now the Indus
command you can see we are uploading the
part to the same bucket so that that
test tests the key is the original file
so this is the first part that's why
we're gonna put the part number one and
body is the part file which is part test
file that's a a so remember we had three
files there before so this is the first
one and then upload ID is the upload ID
that we retrieved in earlier step so for
our upload to be successful we need to
upload all those three three parts so
we're gonna do the same thing for all
the parts basically operative is gonna
be same everything remains same here
except the part number and body so I'm
just gonna quickly update this command
here so my file this time is gonna be a
B that's my body for this command and
then it's gonna be part number two and
then hit enter again
so remember every time we do this it's
it is giving us this attack and then we
will be using that attack again later
for later stages so we will need to
record that as well so I'm gonna do the
part three upload and then I'm gonna
just edit the file here so this is AC
and then the part number for this
command is part number three
so like earlier cities I'm gonna copy
these attacks for all of these parts in
my text file which I'm I will have to
use later to stitch all of these files
to a single file
now while the multi-part upload is
taking place we can run this command to
list the parts of all successfully
uploaded parts so the command for that
one is it all SS 3 API then list parts
upload ID so provide is a long character
which is actually saved in my text
document here so that stuff for ID
alright now you can see the result of
this command so these are the parts that
has been uploaded so we have
successfully uploaded three parts so you
can see the part numbers here the size
of the part so we can see that the
multipath upload has been completed here
with death status so after all the
multi-part files are uploaded create a
JSON file so you could just create a
file name call my file parts to JSON and
then include all the part numbers and
attacks there so here you need the etags
of all the parts that we have noted in
text file earlier so actually I've
created a JSON text file my file parts
transition so you need to create a file
similar to this file here so basically
it will have parts part number and then
the attacks for each parts now to
complete the multi-part file upload we
need to run this command so I'm gonna
base the command here which I've already
constructed so this command determines
is of the file parts by reading the JSON
formatted files so in my case assistant
for my file is my file part suggestion
which I created in early step and then
it reassembles the file as the original
file in the specified s3 bucket as a
bucket here is Satya that's test now I'm
gonna hit enter here
so now as you can see the output of this
command it indicates that the file
upload is successful and the original
file is recreated successfully so you
can see here in my bucket
saute that test you can see the original
file original file that that constructed
successfully thanks for watching and
happy cloud computing from all of us
[Music]
you
[Music]