Search code examples
amazon-web-servicesamazon-s3amazon-ebs

How can I transfer data from an EBS volume to a S3 bucket?


I have about 400 GB data on an Amazon EBS volume and I need this data in a S3 bucket for Hadoop EMR usage.

How can I move/copy data from an EBS volume to a S3 bucket (both S3 bucket and EBS volume are in the same AWS region)?

Thanks


Solution

  • The AWS Command Line Interface is meanwhile the recommended choice for all things AWS:

    The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

    On top of this unified approach to all AWS APIs, it also adds a new set of simple file commands for efficient file transfers to and from Amazon S3, with characteristics similar to the well known Unix commands, e.g. for the task at hand:

    • cp - Copies a local file or S3 object to another location locally or in S3.
    • sync - Syncs directories and S3 prefixes.
    • ...

    So cp would be sufficient for your use case, but be sure to check out sync as well, it is particularly powerful for many frequently encountered scenarios (and sort of implies cp depending on the arguments).