The following is S3cmd usage (as shown if you type s3cmd -h). To access all the options and commands listed below, you'll need version 1.5
Official s3cmd repo -- Command line tool for managing Amazon S3 and CloudFront services
バックアップ処理など、スクリプト操作をおこないたい等の場合は、このs3cmdが便利です。
コマンドラインでS3を操作できるs3cmdなんて便利なものがあるのですね。早速インストールして使ってみました。
sudo pip install python-magic
Windows You'll need DLLs for libmagic. @julian-r maintains a pypi package with the DLLs, you can fetch it with: pip install python-magic-bin
s3cmdすら今更感がありますが、version 1.5.2準拠です(最新は2.0.2のよう)。
バケットを作成したりファイルやフォルダをアップロードしたり公開設定を指定したりといった事が簡単にできます。
バックアップ用のS3バケットを用意して、S3にDBをバックアップするようにしてみました。
C:\Users\hotate\AppData\Local\Programs\Python\Python310\Scripts\s3cmd.bat
python %~dp0\s3cmd %*
>s3cmd.bat