Simple MySQL backup to Amazon S3 using Docker

This is just a short notice about a convenient was of making daily MySQL backups to Amazon S3. Docker is used here to spin up MySQL and AWS CLI tool.

Copy folder from AWS S3

How could we copy a folder from AWS S3 to local machine using AWS CLI?

AWS permissions to S3 folder

Let’s imagine that we have a project, which actually use AWS S3 as file storage. The project consists of 2 parts: one part puts files into S3, and the other part only reads them from S3. Moreover, files are stored not in the bucket root, but in some folder which is placed in the bucket root. According to best AWS practices, we need 2 security and access control policies. One policy is for that part of software which puts files into S3 folder.