Lakh Bawa
Posted on May 14, 2021
Amazon S3 is a pretty good and inexpensive choice for website data storage. You can save a lot of money uploading website data such as user uploads to S3 instead of your hosting server.
I found it a little difficult to understand how s3 migration works and did not find any simple tutorial on that. So here I am sharing the steps that can help you to migrate data to the S3 bucket.
Steps:
- Install Aws Cli on your existing Server
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Reference: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html
Go to the IAM section in your AWS console and create a user will full administration access. Note down the Access Key Id and Access key secret provided to you after creating the user account.
Configure the Aws Cli on your Server using
aws configure
command, and provide Access Key Id and secret that you created before.
run
aws s3 list
to see the list of s3 buckets created inside your account( create one if you haven't done so).Run the following command to copy the files to s3 bucket
aws s3 cp directory-to-be-uploaded s3://bucket-name-here --recursive
Thanks for reading.
Posted on May 14, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.