amazon-s3

Uploading to Amazon S3 using cURL/libcurl

廉价感情. 提交于 2020-01-12 08:26:43
问题 I am currently trying to develop an application to upload files to an Amazon S3 bucket using cURL and c++. After carefully reading the S3 developers guide I have started implementing my application using cURL and forming the Header as described by the Developers guide and after lots of trials and errors to determine the best way to create the S3 signature, I am now facing a 501 error. The received header suggests that the method I'm using is not implemented. I am not sure where I'm wrong but

Uploading to Amazon S3 using cURL/libcurl

感情迁移 提交于 2020-01-12 08:26:12
问题 I am currently trying to develop an application to upload files to an Amazon S3 bucket using cURL and c++. After carefully reading the S3 developers guide I have started implementing my application using cURL and forming the Header as described by the Developers guide and after lots of trials and errors to determine the best way to create the S3 signature, I am now facing a 501 error. The received header suggests that the method I'm using is not implemented. I am not sure where I'm wrong but

Upload Directory with files to S3 using Java

不问归期 提交于 2020-01-12 07:42:41
问题 I'm working on the application where user will upload ZIP file to my server, on the server that ZIP file will be expanded and then I need to upload it to the server. Now my questions is: how to upload directory with multiple files and sub-folders using Java to S3 bucket? Is there any examples for that? Currently i'm using JetS3t to manage all my communications with S3. 回答1: I built something very similar. After expanding the zip on the server call FileUtils.listFiles() which will recursively

Rails Paperclip S3 rename thousands of files?

无人久伴 提交于 2020-01-12 05:54:29
问题 I'm trying to rename a lot of files in s3--changing the current paperclip has_attached_file :path from stuff/:id_:updated_at_:style.:extension to stuff/:id_:counter_:style.:extension , where :counter is a field in the same model as the image. I haven't the foggiest on how to rename all the files--preferably in a rake task. Incidentally, I'll be incrementing :counter each time a new file is saved to the record. This is Rails 3 and the latest Paperclip as of this posting. Any ideas? Thanks! 回答1

Zip up all Paperclip attachments stored on S3

依然范特西╮ 提交于 2020-01-12 04:31:27
问题 Paperclip is a great upload plugin for Rails. Storing uploads on the local filesystem or Amazon S3 seems to work well. I'd just assume store files on the localhost, but the use of S3 is required for this app as it will be hosted on Heroku. How would I go about getting all of my uploads/attachments from S3 in a single zipped download? Getting a zip of files from the local filesystem seems straight forward. It's getting the files from S3 that has me puzzled. I think it may have something to do

Zip up all Paperclip attachments stored on S3

跟風遠走 提交于 2020-01-12 04:31:09
问题 Paperclip is a great upload plugin for Rails. Storing uploads on the local filesystem or Amazon S3 seems to work well. I'd just assume store files on the localhost, but the use of S3 is required for this app as it will be hosted on Heroku. How would I go about getting all of my uploads/attachments from S3 in a single zipped download? Getting a zip of files from the local filesystem seems straight forward. It's getting the files from S3 that has me puzzled. I think it may have something to do

PUT file to S3 with presigned URL

时光毁灭记忆、已成空白 提交于 2020-01-12 04:12:28
问题 I've been playing with Amazon S3 presigned URLs all night attempting to PUT a file. I generate the presigned URL in java code. AWSCredentials credentials = new BasicAWSCredentials( accessKey, secretKey ); client = new AmazonS3Client( credentials ); GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest( bucketName, "myfilename", HttpMethod.PUT); request.setExpiration( new Date( System.currentTimeMillis() + (120 * 60 * 1000) )); return client.generatePresignedUrl( request )

using lambda functions to unzip archives in S3 is really sloooooow

馋奶兔 提交于 2020-01-12 03:42:10
问题 My company is uploading large archive files to S3, and now wants them to be unzipped on S3. I wrote a lambda function based on unzip, triggered by arrival of a file to the xxx-zip bucket, which streams the zip file from S3, unzips the stream, and then streams the individual files to the xxx-data bucket. It works, but I find it is much slower than I expect - even on a test file, zip size about 500k and holding around 500 files, this is timing out with a 60 second timeout set. Does this seem

Is it possible to copy between AWS accounts using AWS CLI?

社会主义新天地 提交于 2020-01-12 03:24:31
问题 Is it possible using AWS CLI to copy the contents of S3 buckets between AWS accounts? I know it's possible to copy/sync between buckets in the same account, but I need to get the contents of an old AWS account into a new one. I have AWS CLI configured with two profiles, but I don't see how I can use both profiles in a single copy/sync command. 回答1: Very Simple. Let's say: Old AWS Account = old@aws.com New AWS Account = new@aws.com Loginto the AWS console as old@aws.com Go to the bucket of

Is it possible to copy between AWS accounts using AWS CLI?

北战南征 提交于 2020-01-12 03:23:35
问题 Is it possible using AWS CLI to copy the contents of S3 buckets between AWS accounts? I know it's possible to copy/sync between buckets in the same account, but I need to get the contents of an old AWS account into a new one. I have AWS CLI configured with two profiles, but I don't see how I can use both profiles in a single copy/sync command. 回答1: Very Simple. Let's say: Old AWS Account = old@aws.com New AWS Account = new@aws.com Loginto the AWS console as old@aws.com Go to the bucket of