Follows are command lines that I often use (not necessarily the best approach) while interacting with AWS. Before starting, you will need to install the CLI.

  • For macOS, use brew install awscli
  • For Linux, use pip install awscli

Commands

  • list files from a public S3 bucket. If the bucket is not publicly accessible, you need to sign in and do not need the --no-sign-request flag:

    aws --no-sign-request s3 ls s3://<bucket>/<path>
    
  • Download files from a S3 bucket:

    aws s3 sync s3://<bucket>/<path> </local/path>