Copy file or folder from amazon S3 to EC2

  1. Install aws cli in the ec2 instance [if not installed]
  2. $ sudo yum install aws-cli

  3. Configure aws cli
  4. $ aws configure
    AWS Access Key ID [None]: <your_access_key>
    AWS Secret Access Key [None]:<your_secret_key>
    Default region name [None]:
    Default output format [None]:

  5. Execute sync command in ec2 instance
  6. aws s3 sync s3://<path_to_file> <ec2_local_path>

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s