amazon-s3

What is the Difference between file_upload() and put_object() when uploading files to S3 using boto3

孤街醉人 提交于 2020-02-20 06:23:09
问题 I'm using boto3 and trying to upload files. It will be helpful if anyone will explain exact difference between file_upload() and put_object() s3 bucket methods in boto3 ? Is there any performance difference? Does anyone among these handles multipart upload feature in behind the scenes? What are the best use cases for both? 回答1: The upload_file method is handled by the S3 Transfer Manager, this means that it will automatically handle multipart uploads behind the scenes for you, if necessary.

RDS to S3 using pg_dump directly (without intermediary)

a 夏天 提交于 2020-02-18 09:51:14
问题 It's possible run pg_dump in the RDS or in a S3 (without using a intermediary like ec2 to execute the command) 回答1: You should be able to access it as long as your db security group allows external access to port 5432 (default for postgres). Then you can just run: pg_dump -h <database_host> -U <username> <database> Keep in mind that your connection will not be encrypted. AFAIK, there is no interface in AWS between RDS and S3, so you would have to use an intermediary to transfer the data to S3

RDS to S3 using pg_dump directly (without intermediary)

独自空忆成欢 提交于 2020-02-18 09:47:44
问题 It's possible run pg_dump in the RDS or in a S3 (without using a intermediary like ec2 to execute the command) 回答1: You should be able to access it as long as your db security group allows external access to port 5432 (default for postgres). Then you can just run: pg_dump -h <database_host> -U <username> <database> Keep in mind that your connection will not be encrypted. AFAIK, there is no interface in AWS between RDS and S3, so you would have to use an intermediary to transfer the data to S3

How to get notified when the upload is complete while using TransferManager Class?

左心房为你撑大大i 提交于 2020-02-07 08:27:36
问题 I am using TransferManager to upload a video. As TransferManager is asynchronous, How can i get notified when the upload is successfully completed? 回答1: Using TransferManager for uploading returns a Upload object, which is a subclass of Transfer. This object has methods for polling for status ( isDone , getProgress ) or you can also register a ProgressListener to receive events as the transfer is processed. 来源: https://stackoverflow.com/questions/13577384/how-to-get-notified-when-the-upload

How to get notified when the upload is complete while using TransferManager Class?

帅比萌擦擦* 提交于 2020-02-07 08:26:10
问题 I am using TransferManager to upload a video. As TransferManager is asynchronous, How can i get notified when the upload is successfully completed? 回答1: Using TransferManager for uploading returns a Upload object, which is a subclass of Transfer. This object has methods for polling for status ( isDone , getProgress ) or you can also register a ProgressListener to receive events as the transfer is processed. 来源: https://stackoverflow.com/questions/13577384/how-to-get-notified-when-the-upload

Implementing queue for image processing in Laravel - what to queue and what not to?

穿精又带淫゛_ 提交于 2020-02-07 05:33:27
问题 I have a Laravel based application which is image intensive. Users can upload images to the server and the images are stored on Amazon s3 bucket after being resized. The process is pretty slow here and I've been reading up on queues and think they may be exactly what i need to kind of delegate the part of storing on amazon to. The only thing is that this is my postAction which handles the uploading: public function postImage(){ $images = Input::only('images'); $model->saveImages($images[

Implementing queue for image processing in Laravel - what to queue and what not to?

主宰稳场 提交于 2020-02-07 05:33:06
问题 I have a Laravel based application which is image intensive. Users can upload images to the server and the images are stored on Amazon s3 bucket after being resized. The process is pretty slow here and I've been reading up on queues and think they may be exactly what i need to kind of delegate the part of storing on amazon to. The only thing is that this is my postAction which handles the uploading: public function postImage(){ $images = Input::only('images'); $model->saveImages($images[

Enabling and Disabling a S3 Replication Rule through api/cli

妖精的绣舞 提交于 2020-02-07 02:55:09
问题 I have set up a replication rule on my S3 bucket to populate a preprod bucket for testing purposes. This means I will want to be able to turn the replication on and off easily, and likely dump and refresh the replication bucket as necessary. I'm creating a script for this but am having a hard time finding a way to easily turn the replication rule on and off outside of using the AWS Console. Is there an option beyond put-bucket-replication? That works but is basically restating the whole

Use aws cli to add a statement to an existing S3 bucket policy

帅比萌擦擦* 提交于 2020-02-06 06:44:56
问题 Assuming I already have a policy attached to a bucket, in the likes of: { "Version": "2012-10-17", "Id": "123", "Statement": [ { "Effect": "Deny", "Principal": { "AWS": "arn:aws:iam::9876543211:someuser" }, "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*" ] } ] } I want to update this policy, so that I enforce SSL (i.e. I want the statement above to remain intact). How can I use aws cli so that my policy ends up looking like this: { "Version": "2012-10-17",

Use aws cli to add a statement to an existing S3 bucket policy

寵の児 提交于 2020-02-06 06:41:11
问题 Assuming I already have a policy attached to a bucket, in the likes of: { "Version": "2012-10-17", "Id": "123", "Statement": [ { "Effect": "Deny", "Principal": { "AWS": "arn:aws:iam::9876543211:someuser" }, "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*" ] } ] } I want to update this policy, so that I enforce SSL (i.e. I want the statement above to remain intact). How can I use aws cli so that my policy ends up looking like this: { "Version": "2012-10-17",