Amazon S3 – How to fix ‘The request signature we calculated does not match the signature’ error?

I have searched on the web for over two days now, and probably have looked through most of the online documented scenarios and workarounds, but nothing worked for me so far. I am on AWS SDK for PHP V2.8.7 running on PHP 5.3. I am trying to connect to my Amazon S3 bucket with the … Read more

AWS Error Message: A conflicting conditional operation is currently in progress against this resource

I’m getting this error intermittently. I have a program that uses the java aws sdk and loads over the 10s of thousands of small files to s3. I see this error intermittently. Could not find any helpful answer after doing a quick search on the internet. Note the calling program is single threaded. The underlying … Read more

Serving gzipped CSS and JavaScript from Amazon CloudFront via S3

I’ve been looking for ways of making my site load faster and one way that I’d like to explore is making greater use of Cloudfront. Because Cloudfront was originally not designed as a custom-origin CDN and because it didn’t support gzipping, I have so far been using it to host all my images, which are … Read more

AccessDenied for ListObjects for S3 bucket when permissions are s3:*

I am getting: An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied When I try to get folder from my S3 bucket. Using this command: aws s3 cp s3://bucket-name/data/all-data/ . –recursive The IAM permissions for the bucket look like this: { “Version”: “version_id”, “Statement”: [ { “Sid”: “some_id”, “Effect”: “Allow”, “Action”: [ “s3:*” … Read more

How to rename AWS S3 Bucket

After all the tough work of migration etc, I just realised that I need to serve the content using CNAME (e.g media.abc.com). The bucket name needs to start with media.abc.com/S3/amazon.com to ensure it works perfectly. I just realised that S3 doesn’t allow direct rename from the console. Is there any way to work around this? … Read more

S3 Bucket action doesn’t apply to any resources

I’m following the instructions from this answer to generate the follow S3 bucket policy: { “Id”: “Policy1495981680273”, “Version”: “2012-10-17”, “Statement”: [ { “Sid”: “Stmt1495981517155”, “Action”: [ “s3:GetObject” ], “Effect”: “Allow”, “Resource”: “arn:aws:s3:::surplace-audio”, “Principal”: “*” } ] } I get back the following error: Action does not apply to any resource(s) in statement What am I … Read more

How can I tell how many objects I’ve stored in an S3 bucket?

Unless I’m missing something, it seems that none of the APIs I’ve looked at will tell you how many objects are in an <S3 bucket>/<folder>. Is there any way to get a count? 32 Answers 32 Using AWS CLI aws s3 ls s3://mybucket/ –recursive | wc -l or aws cloudwatch get-metric-statistics \ –namespace AWS/S3 –metric-name … Read more