You must have s3 configured backet on your AWS account and configured AWS CLI on your system to run backup script. Check this guides to make it: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
You can free modify scripts for your needs, every block of code is independent and will not affect other.