First create an IAM programmatic user which has permissions to s3 from AWS console. Note down the access ID and the secret KEY

Now, lets configure AWS CLI in the server.

To install the CLI in CentOS 7 lets do this :

sudo yum -y install python-pip
sudo pip install --upgrade pip
sudo pip install awscli

If its CentOS 8, you can do this :

sudo dnf install -y python3 python3-pip
sudo pip3 install awscli

Now, using the following command configure AWS :

aws configure

Enter the access ID and secret key and the region.

Now, the AWS cli is configured. Lets move the files to bucket. If you have already created the bucket, ignore the following or create the bucket using the following command :

aws s3 mb s3://bucketname

If you have already created the bucket and if you know the bucket name, do this :

aws s3 sync /pathtothefolder/ s3://bucket-name

The files would be uploaded to the bucket