Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible for emacs to load a buffer from a Amazon S3 bucket?

Is it possible for emacs to load a buffer from a Amazon S3 bucket? If so has somebody already built something that can do this?

like image 525
Vanson Samuel Avatar asked Feb 12 '11 20:02

Vanson Samuel


People also ask

How do I extract data from AWS S3?

In the Amazon S3 console, choose your S3 bucket, choose the file that you want to open or download, choose Actions, and then choose Open or Download. If you are downloading an object, specify where you want to save it. The procedure for saving the object depends on the browser and operating system that you are using.

What is the maximum capacity of S3 bucket?

The total volume of data and number of objects you can store are unlimited. Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 TB. The largest object that can be uploaded in a single PUT is 5 GB.


1 Answers

Have you tried using curl?

In which case, you could do something like (untested):

(defun grab-s3-bucket (url)
  (interactive "sURL for Amazon s3 bucket: ")
  (shell-command (format "curl -O %s" url) (get-buffer-create url)))

M-x grab-s3-bucket URL

You could write the results back with something like:

(defun write-s3-bucket (url)
  (interactive "sURL for Amazon s3 bucket: ")
  (shell-command-on-region (format "curl %s -T " url)))

You could even get tricky and bind C-x C-s to the write-s3-bucket, using a buffer local variable to store the URL for the s3 bucket (that would get created upon the call to grab-s3-bucket).

like image 126
Trey Jackson Avatar answered Sep 27 '22 20:09

Trey Jackson