Title: V 0.9.3 CDN Cloudfront Error &#8211; Empty Access Key
Last modified: August 21, 2016

---

# V 0.9.3 CDN Cloudfront Error – Empty Access Key

 *  [sadujsaint](https://wordpress.org/support/users/sadujsaint/)
 * (@sadujsaint)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/)
 * I have just updated W3TC to the latest version and while everything appears to
   be running fine, I get an odd error when I test the Cloudfront distribution using
   the button in the “Configuration” section of the CDN sub-section on the dashboard.
 * When I test it gives the error “Empty Access Key”, despite working fine before
   and even when I try a different access key and secret key I still have the same
   problem.
 * However, when I check files and images on my site I can clearly see that they
   are being served correctly from the CDN. Perhaps it is the error message at fault
   as everything else seems to be functioning perfectly.
 * Anyone else with a similar issue or fix?
    (There is a tread for issues with MAXCDN
   as well: [http://wordpress.org/support/topic/error-empty-hostname-for-maxcdn-test](http://wordpress.org/support/topic/error-empty-hostname-for-maxcdn-test)
   with some people reporting a similar issue)
 * [http://wordpress.org/plugins/w3-total-cache/](http://wordpress.org/plugins/w3-total-cache/)

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/page/2/?output_format=md)

 *  [nasca](https://wordpress.org/support/users/nasca/)
 * (@nasca)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023263)
 * I was/am having the same issue … sort of. I am getting the same error message
   when testing the configuration.
 * I have tided to ‘validate’ the configuration 2 ways.
    (1) AWS>Sect Creds> CloudFront
   > Access and Secret (2) Create User / Group / Permissions via IAM with the AWS
   Policy Generator.
 * However, even though the plugin does not validate the Access Key and Secret Key…
   CloudFront is serving content for my domain / site. I know this because when 
   viewing the page source in the browser the CNAME configured in Route53 is visible.
   If you don’t have Route 53 configured with a sub domain for CloudFront you will
   just see something like #######.cloudfront.com
 * My guess is that the plugin validation needs to be updated and I wouldn’t worry
   about the “Empty Access Key’ error if in fact CloudFront is serving content.
 *  [mattjabs](https://wordpress.org/support/users/mattjabs/)
 * (@mattjabs)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023302)
 * I’m having this exact issue.
 * When testing the Cloudfront distribution I receive: “Error: Empty access key.”
 * So in the w3tc CDN Configuration settings, under “Origin” I clicked “Create distribution”
   and it created a new distribution – which I verified by viewing my AWS Cloudfront
   Distributions dashboard.
 * So now I have two distributions in my AWS Dashboard. I disabled my original one
   and let the new one propagate. I also created a 2nd Access Key ID (with Secret
   Access Key).
 * In the w3tc CDN Configuration settings I input the new Access Key ID and new 
   Secret Access Key. I also entered the new distribution prefix in the xxxxxxxxxxxxxx.
   cloudfront.net field.
 * When I test the distribution I still get this message: “Error: Empty access key.”
   Despite the error the CDN is still serving my page, **but here’s the kicker:**
   when I purge the CDN of files (like say a style.css file) it purges/invalidates
   the OLD CDN distribution – the one I disabled!
 *  [nasca](https://wordpress.org/support/users/nasca/)
 * (@nasca)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023341)
 * This is the first time I have used CouldFront with this site so I haven’t invalidated
   anything yet.
 * I am curious though… when you view page source which distribution is serving 
   content?
 *  Thread Starter [sadujsaint](https://wordpress.org/support/users/sadujsaint/)
 * (@sadujsaint)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023343)
 * Thanks for all the responses, good to know I am not alone with this. I have done
   my fair share of testing too and haven’t come up with anything as of yet.
 * @ nasca when I check the page source the CDN is still serving content, but I 
   haven’t tried testing any changes to CSS or adding new images (both served from
   the CDN) as this is now on a live site (I did test the update on my test site,
   but didn’t spot this in time…).
 * Regrettably I have had to disable my CDN for now within the plugin and relying
   only on Cloudflare to keep things up to speed. I will give it a day or two and
   if there is no fix I will revert to the previous version of W3TC as I am out 
   of ideas on how we might fix this short of an update.
 *  [mattjabs](https://wordpress.org/support/users/mattjabs/)
 * (@mattjabs)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023346)
 * [@nasca](https://wordpress.org/support/users/nasca/) I have it disabled, but 
   I reenabled it to check and it’s serving the new distribution. It’s worth noting
   that the display of the new distribution is broken – serving up a plain text 
   version of each article/page – so I have to keep the CDN option disabled in w3tc
   until a fix comes out.
 *  [PE-Pernet](https://wordpress.org/support/users/pe-pernet/)
 * (@pe-pernet)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023359)
 * All,
    I initially setup a cloudfront instance, later because I don’t get expected
   results, I try both Cloudfront and Cloudflare together… I finally disable my 
   Cloudfront CDN. I have the same (even better) results with Cloudflare and it’s
   free…
 * I don’t know if the issue comes from cloufront or using both cloudfront & cloudflare
   but my GTMetrix and Pingdom results are much better now.
 *  [gr33nman](https://wordpress.org/support/users/gr33nman/)
 * (@gr33nman)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023427)
 * I’m also having trouble getting Amazon Web Services Cloudfront CDN to work. It
   used to work. When I test the new suggested IAM configuration, I get this in 
   red: `Error: Empty access key.`
    This page: [https://portal.aws.amazon.com/gp/aws/securityCredentials](https://portal.aws.amazon.com/gp/aws/securityCredentials)?
   Has had this statement at the top for well over a year: `Note: Please use the
   new page named Your Security Credentials in the AWS Management Console to manage
   security credentials. AWS will support the current page for a limited time to
   help during your transition.` It’s been about a year or more, I think.
 * On this page:
    [http://wordpress.org/plugins/w3-total-cache/faq/](http://wordpress.org/plugins/w3-total-cache/faq/)
   the directions seem still geared toward the old method of using root credentials.
   Are the directions up to date on how to use IAM policies on this W3 Total Cache
   FAQ page?
 *  [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023454)
 * lib/W3/AdminActions/CdnActionsAdmin.php:371
 *     ```
       $config = W3_Request::get_string('config');
       $config = json_decode($config, true);
       ```
   
 * w3tc tries to read config as a string, but config is not a JSON encoded array
   but a PHP array
    it gets “Array” as a value
 * Solution??
 *     ```
       $config = W3_Request::get_array('config');
       //            $config = json_decode($config, true);
       ```
   
 * Works for me.
 * It would be good to have a github repo to have a Pull Request.
 *  [mattjabs](https://wordpress.org/support/users/mattjabs/)
 * (@mattjabs)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023455)
 * szepe.viktor – your solution worked for me too. Thanks for sharing!
 *  [parse](https://wordpress.org/support/users/parse/)
 * (@parse)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023466)
 * Having the same issue, the solution offered above didn’t work for me.
 * Deactivating W3 Total Cache until further notice.
 *  [otreva](https://wordpress.org/support/users/otreva/)
 * (@otreva)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023470)
 * Confirmed that does work:
 * Starting at line 370 -> 373 use this:
 *     ```
       if (!isset($config['host'])) {
               $config = W3_Request::get_array('config');
               #$config = json_decode($config, true);
           }
       ```
   
 *  [geophray](https://wordpress.org/support/users/geophray/)
 * (@geophray)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023477)
 * Darn… I was hopeful that this would help resolve this same problem on my site,
   but to no avail. (I am using S3/Cloudfront.)
 * It seems like it is serving from the CDN though, so I will probably leave the
   plugin active to keep the load off my server, but it would be nice to have a 
   fix.
 *  [scotthenning](https://wordpress.org/support/users/scotthenning/)
 * (@scotthenning)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023478)
 * Having the same issue with RackSpace CloudFiles. Above solution doesn’t work 
   unfortunately.
 *  [sagarrao](https://wordpress.org/support/users/sagarrao/)
 * (@sagarrao)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023484)
 * The work around above didn’t work for me either. I still have the Error: Empty
   hostname / CNAME list. Let me know if anybody have an alternative fix.
 *  [Samara](https://wordpress.org/support/users/spadilla/)
 * (@spadilla)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/#post-4023515)
 * Just chiming in to add that I am having the same issue with both S3 and Cloudfront.

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/page/2/?output_format=md)

The topic ‘V 0.9.3 CDN Cloudfront Error – Empty Access Key’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [CloudFront](https://wordpress.org/support/topic-tag/cloudfront/)
 * [W3TC](https://wordpress.org/support/topic-tag/w3tc/)

 * 30 replies
 * 23 participants
 * Last reply from: [Willie Jackson](https://wordpress.org/support/users/williejackson/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/v-093-cdn-cloudfront-error-empty-access-key/page/2/#post-4023580)
 * Status: not resolved