amazon web services - Writing to file in S3 Bucket -
i want create file in s3 bucket.
i have list has 10,000 strings in single iteration, want write s3, clear list. then, in second iteration, list populated again 10,000 entries, possible write these new 10,000 entries same file in s3 bucket ? how can store these entries in s3 without storing on local machine ?
there several ways store objects in amazon s3.
the simplest copy local file s3, can done programmatically or aws command-line interface (cli). example:
aws s3 cp foo.txt s3://my-bucket/foo.txt
the aws s3 cp
command has ability take input stdin
, send output stdout
. so, if have program outputting text stdout
, store in s3 with:
./myapp | aws s3 cp - s3://my-bucket/foo.txt
see: uploading local file stream s3 in aws s3 cp documentation.
alternatively, write objects amazon s3 directly application using aws sdk preferred language. could, example, stream data amazon s3 object without having write local disk first.
Comments
Post a Comment