Questions tagged [amazon-s3]

Amazon S3 (simple storage service) is an online object storage service from Amazon Web Services. QUESTIONS MUST BE ABOUT PROGRAMMING. Questions about general S3 support, functionality, configuration, etc. are OFF-TOPIC.

Amazon S3 (Simple Storage Service) is an online strongly consistent storage web service offered by Amazon Web Services. Amazon S3 provides storage through a simple web services interface. It gives any developer access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure that Amazon uses to run its own global network of web sites.

References

Tutorials

49879 questions
123
votes
28 answers

How do I delete a versioned bucket in AWS S3 using the CLI?

I have tried both s3cmd: $ s3cmd -r -f -v del s3://my-versioned-bucket/ And the AWS CLI: $ aws s3 rm s3://my-versioned-bucket/ --recursive But both of these commands simply add DELETE markers to S3. The command for removing a bucket also doesn't…
122
votes
4 answers

Static hosting on Amazon S3 - DNS Configuration

I'm working on a little webapp (all client-side) I want to host it on Amazon S3. I've found several guides on this and have managed to create myself a bucket (with the same name as my domain), set it as a website and upload some content. Where I'm…
Merlin Mason
  • 1,607
  • 2
  • 12
  • 14
120
votes
11 answers

How to determine if object exists AWS S3 Node.JS sdk

I need to check if a file exists using AWS SDK. Here is what I'm doing: var params = { Bucket: config.get('s3bucket'), Key: path }; s3.getSignedUrl('getObject', params, callback); It works but the problem is that when the object doesn't…
Maurício Giordano
  • 3,116
  • 4
  • 32
  • 60
120
votes
2 answers

How long should I wait after applying an AWS IAM policy before it is valid?

I'm adding and removing AWS IAM user policies programmatically, and I'm getting inconsistent results from the application of those policies. For example, this may or may not succeed (I'm using the Java 1.6.6 SDK): Start with a user that can read…
119
votes
1 answer

What is the maximum length of a filename in S3

Maybe I'm blind but i can't find, in S3 documentation, the maximum file name length that can be uploaded in S3.
ohe
  • 3,461
  • 3
  • 26
  • 50
119
votes
10 answers

Read file content from S3 bucket with boto3

I read the filenames in my S3 bucket by doing objs = boto3.client.list_objects(Bucket='my_bucket') while 'Contents' in objs.keys(): objs_contents = objs['Contents'] for i in range(len(objs_contents)): filename =…
mar tin
  • 9,266
  • 23
  • 72
  • 97
117
votes
8 answers

Amazon AWS Filezilla transfer permission denied

I have my instance of the Amazon AWS running, test page is up. I am trying to SFTP the files to the server to display my website. I have Filezilla connected to the AWS server but when I try to move the files from my local machine to the…
zburns12
  • 1,783
  • 3
  • 15
  • 16
115
votes
8 answers

Backup strategies for AWS S3 bucket

I'm looking for some advice or best practice to back up S3 bucket. The purpose of backing up data from S3 is to prevent data loss because of the following: S3 issue issue where I accidentally delete this data from S3 After some investigation I…
Sergey Alekseev
  • 11,910
  • 11
  • 38
  • 53
114
votes
6 answers

Powershell - Why is Using Invoke-WebRequest Much Slower Than a Browser Download?

I use Powershell's Invoke-WebRequest method to download a file from Amazon S3 to my Windows EC2 instance. If I download the file using Chrome, I am able to download a 200 MB file in 5 seconds. The same download in PowerShell using Invoke-WebRequest…
Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248
113
votes
5 answers

AWS S3 pre signed URL without Expiry date

Is there any way that I can generate Pre-Signed URL's without any expiry date ? I'm developing a Email app where my attachments will be saved in S3. Also please let me know what is the best way to download attachments via JavaScript SDK. I'm using…
srinisunka
  • 1,159
  • 2
  • 7
  • 10
113
votes
14 answers

How to get the md5sum of a file on Amazon's S3

If I have existing files on Amazon's S3, what's the easiest way to get their md5sum without having to download the files?
Switch
  • 5,126
  • 12
  • 34
  • 40
112
votes
11 answers

Read file from aws s3 bucket using node fs

I am attempting to read a file that is in a aws s3 bucket using fs.readFile(file, function (err, contents) { var myLines = contents.Body.toString().split('\n') }) I've been able to download and upload a file using the node aws-sdk, but I am at a…
Joel
  • 1,579
  • 3
  • 12
  • 19
112
votes
8 answers

Amazon S3 and Cloudfront cache, how to clear cache or synchronize their cache

I have a cron job that runs every 10 minutes and updates the content-type and x-amz-meta. But since yesterday it seems like after the cron job run, Amazon is not picking up the changes made (refreshing his cache). I even went and made the changes…
mamesaye
  • 2,033
  • 2
  • 32
  • 49
110
votes
13 answers

How to display only files from aws s3 ls command?

I am using AWS CLI to list the files in an AWS S3 bucket using the following command (aws s3 ls): aws s3 ls s3://mybucket --recursive --human-readable --summarize This command gives me the following output: 2013-09-02 21:37:53 10 Bytes…
Borealis
  • 8,044
  • 17
  • 64
  • 112
109
votes
9 answers

Correct S3 + Cloudfront CORS Configuration?

My application stores images on S3 and then proxies them through Cloudfront. I'm excited to use the new S3 CORS support so that I can use HTML5 canvas methods (which have a cross-origin policy) but can't seem to configure my S3 and Cloudfront…
kateray
  • 2,066
  • 4
  • 18
  • 23