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.