The name this file should have in S3, including any "keys"
that are part of the name. This should not start with
a slash (if it does, the leading slash will be removed),
but can contain forward slashes.
bucket
Name of the S3 bucket to copy to.
profile
Corresponds to a profile set in the config file for the AWS CLI
(see the documentation).
If this argument is omitted,the default profile is used.
acl
Should be one of private, public-read, or public-read-write.
Details
Uses the AWS Command Line Interface
to copy a file to Amazon S3. Assumes the CLI is properly configured
and that the aws program is in your PATH. The CLI should be
configured with the credentials of a user who has permission to
upload to the appropriate bucket. It's recommended to use
IAM to set up users
with limited permissions.
There is an RAmazonS3 package but it seems to have issues
uploading files to S3.
Value
TRUE on success. If the command fails, the function
will exit with an error.
Author(s)
Dan Tenenbaum
Examples
## Not run:
upload_to_S3("myfile.txt", "foo/bar/baz/yourfile.txt")
# If this is successful, the file should be accessible at
# http://s3.amazonaws.com/annotationhub/foo/bar/baz/yourfile.txt
## End(Not run)