Search code examples
amazon-web-servicesamazon-s3sshrstudioputty

How to sync and read files from S3 bucket through R Studio - SSH'ed to local host with Putty?


I am new to AWS, RStudio and SSH, so this may sound trivial but I need desperate help.

I was able to SSH the instance and RStudio by following some resources but now I want to regularly sync and read files from a public S3 bucket. I can get the bucket content and try to read with s3read_using() command but the file is bigger than it supports and I cannot do it.

How can I sync the S3 bucket and read files? Any help appreciated.


Solution

  • You can aws CLI s3 sync method to sync a bucket with folder

    The sync command is used to sync directories to S3 buckets or prefixes and vice versa. It recursively copies new and updated files from the source ( Directory or Bucket/Prefix ) to the destination ( Directory or Bucket/Prefix ). It only creates folders in the destination if they contain one or more files.

    for reference and usage:

    https://codedestine.com/aws-s3-sync-command/