Hot answers tagged

13 votes
Accepted

Correct IAM settings for Amazon S3 bucket

You need to allow to list bucket location. Also, I'm not confident if you'd be able to upload and delete objects from the bucket with that policy. I'd go with: { "Version": "2012-10-17", "Statement":...
user avatar
12 votes
Accepted

How to set up CloudFront for a Craft site

I'm running Amazon S3+CloudFront on several of my sites. There's not really much to it, Craft makes it really easy: Create a new Amazon S3 assets source in Craft. Set up CloudFront in AWS (see this ...
user avatar
  • 7,238
12 votes
Accepted

Errors occuring with Assets and Amazon S3

There are a few regions that support only S3's v4 of signing requests without the possibility of falling back to v2. The S3 library that Craft 2 uses only supports S3 v2. Check this table for ...
user avatar
9 votes
Accepted

How can I check the progress of a large Assets indexing job?

It's not a log per se, but you can check out the craft_assetindexdata table of your database. That will show you all of the assets which Craft has indexed. You can see how far Craft has gotten by ...
user avatar
  • 23.6k
6 votes
Accepted

Are private S3 assets possible?

Private buckets can be used, but files uploaded to them via the Craft CP will be given public read access. Expiring URLs are not built into Craft because the files being public.
user avatar
6 votes
Accepted

Assets and S3 - Reduced Redundacy Storage

I was under impression that it was a bucket setting, but after doing some reading, it seems that this is a per-object setting and should be performed while uploading to a bucket. I'll add this to the ...
user avatar
6 votes
Accepted

Can I move a local Asset to S3 and keep relations?

Yes you can. Just remember to add your new Assets folder as an assets source to your old Asset fields (fields that are "Asset" types) so users still can add/edit/change their assets.
user avatar
  • 2,824
5 votes
Accepted

Do Remote Assets (ie. S3) have file paths?

This question is really more about S3 than about Craft. What you need for the assets is not the file path, but the url. And yes, S3 assets do have a url. This page describes the format for the host: &...
user avatar
5 votes

Can Craft easily be hosted across multiple servers?

Entirely possible. There is some discussion of having Craft installed in a load-balanced environment here. You'll want to have CRAFT_STORAGE_PATH point to a shared file system for all servers. If ...
user avatar
  • 66.4k
5 votes
Accepted

Multi-Environment S3 Asset Paths

Unfortunately, this isn't currently possible. This feature request is very similar to what you're requesting... however, it would still require that all of your environments use the same type of ...
user avatar
  • 23.6k
5 votes
Accepted

Using Craft environment variable for Asset source subfolder

From the docs, environment variables are currently only parsed in 3 places in the control panel. File System Path (in asset source settings) URL (in asset source settings) Site URL (in Settings → ...
user avatar
  • 66.4k
5 votes
Accepted

Incorrect content/mime-type on S3 SVG upload

Your SVG file is probably missing the the XML declaration at the top (<?xml version="1.0" encoding="UTF-8"?>). PHP's FileInfo detects XML files (which SVG is) without that declaration as text/...
user avatar
  • 66.4k
5 votes

S3 Asset uploading is hanging

The problem was that Frankfurt and London are not currently supported S3 bucket locations in Craft CMS v2.6.2956. Switching to Ireland solved my issue.
user avatar
4 votes

Why are PNG images bigger in file size on the (S3) server?

I agree with Brad's comment, this is very similar to those two other threads. That being said, here is an important quote which is buried on one of those threads... When an image is first uploaded,...
user avatar
  • 23.6k
4 votes
Accepted

What is the value of hosting assets on Amazon S3? Best practices question

S3 is not itself a CDN, no. However, you can use Cloudflare as a free and very easy to set up CDN service in front of it. For me the main advantages of S3 are that it's a centralised repository of ...
user avatar
4 votes
Accepted

Amazon S3 Images not showing up in Assets

I'd recommend updating the asset indexes via Utilities → Asset Indexes (or Settings → Update Asset Indexes if you're on Craft 2) in your Control Panel.
user avatar
  • 171
3 votes

Amazon S3 endpoint is wrong when accessing Asset info

The problem ended up being that I had completely missed the location setting in the database column of the Asset source.
user avatar
  • 2,957
3 votes

Basic Amazon S3 Setup

I did end up opening a support ticket with Craft- they immediately suggested that this could be caused by a firewall. To which I scoffed! But after talking with some other folks in the office, this ...
user avatar
  • 448
3 votes

How to set up CloudFront for a Craft site

I wrote up an article that might be helpful for future-people looking for step by step instructions on setting this up: Setting Up AWS S3 Buckets + CloudFront CDN for your Assets
user avatar
3 votes
Accepted

Saving user profile photos to S3

Craft 3 Update This is currently possible in Craft 3. Install the AWS S3 plugin from the Plugin Store. Make sure you're running Craft Pro. Create a new Asset Volume using S3. Go to Settings->Users-...
user avatar
  • 66.4k
3 votes
Accepted

Renaming files on Amazon S3 through Craft backend

This is definitely possible in Craft PRO -- I just tested with fine results (latest ver. 2.4.2670). So I would look at your IAM policy. If you have your policy statement scoped to the one bucket in ...
user avatar
3 votes
Accepted

Can't find S3 bucket using Craft Pro in trial mode

The bucket you're trying to list is probably in the Frankfurt S3 region. The 3rd party library used in Craft 2.x for Amazon S3 support does not support Signature Version 4 that Frankfurt region ...
user avatar
3 votes
Accepted

Moving Craft assets from one S3 bucket to another

Yes that’s all you need to do. It also works the same if moving to/from a local directory or Google Cloud Storage, or even a subdirectory of any volume type. The index of file paths is relative to the ...
user avatar
2 votes

Multiple Environments Multiple S3

Currently not, but there probably should be. There is already a somewhat related, similar feature request here.
user avatar
  • 66.4k
2 votes

Multi-Environment S3 Asset Paths

We created a plugin to help solve this problem: https://github.com/Firstborn/Craft-CMS-Environment-Settings This plugin allows you to specify different configurations per environment on a single ...
user avatar
2 votes

Correct IAM settings for Amazon S3 bucket

I'm no AWS expert but does your iam user have the correct access/secret keys as well? While you're at it, you might as well grant PutObject, GetObject, and DeleteObject in that policy as well so ...
user avatar
  • 6,467
2 votes

Using Amazon S3 with Craft 2.x in Frankfurt region

The AWS Frankfurt region (eu-central-1) does only support the "new" v4 signature. Craft 2 uses the v2 signature of the S3 API and that's not easy to fix. Ireland (eu-west-1) should be good enough in ...
user avatar
2 votes

Craft Assets on S3 bucket

You would need to build the complete URL to your file in order for it to work in your CSS. See this answer: Do Remote Assets (ie. S3) have file paths? If the background-image is handled by something ...
user avatar
2 votes

Can't find S3 bucket using Craft Pro in trial mode

So is it a Craft trial issue? Are you allowed to connect to S3 in trial version of Craft Pro? Nope. There are no limitations when running Craft on a "non-public" domain in trial mode. However, I ...
user avatar
  • 66.4k
2 votes
Accepted

Craft on Heroku with buckateer as a middleman for Amazon S3

I found a solution that lets you overwrites the core file S3.php without touching the core files. By adding this snippet to config/general.php // S3 override const BUCKET_NAME = 'YOUR BUCKET ...
user avatar
  • 41

Only top scored, non community-wiki answers of a minimum length are eligible