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.
- 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
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
command, and provide Access Key Id and secret that you created before.
aws s3 listto 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.