Title: Error while trying to create CDN in cloudfront
Last modified: August 22, 2016

---

# Error while trying to create CDN in cloudfront

 *  [chromafunk](https://wordpress.org/support/users/chromafunk/)
 * (@chromafunk)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-while-trying-to-create-cdn-in-cloudfront/)
 * I am getting
 * Error: Unable to create distribution for origin domainname.com (S3::createDistribution(‘
   domainname.com’, ‘custom’, 1, ”, ”): [7] Failed to connect to cloudfront.amazonaws.
   com port 80: Connection refused).
 * When I create a pull Cloudfron distro.
 * Seems that I can’t connect to cloudfront. the server is inside a VPC but outbound
   traffic is allowed on security group, I have generated a policy for this user
   with permissions to create distributions and access an S3 bucket, and the IAM
   user is activated, keys are correct.
 * I have tested the policy with the policy simulator and it works.
 * What else can be ? I am on a fresh WP4 installation with the latest version of
   the plugin, can someone shed some light over here ?
 * Thanks
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [chromafunk](https://wordpress.org/support/users/chromafunk/)
 * (@chromafunk)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-while-trying-to-create-cdn-in-cloudfront/#post-5341887)
 * With the policy I am using, I can connect with this user to a S3 bucket but not
   create a CF distro. It’s weird cause as I said I tested a generated policy with
   the policy simulator and it works.
 * Thanks
 *  Thread Starter [chromafunk](https://wordpress.org/support/users/chromafunk/)
 * (@chromafunk)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-while-trying-to-create-cdn-in-cloudfront/#post-5341996)
 * Solved. You can’t create distros over port 80. It was trying to create the distro
   over port 80 instead of 443 because php-ssl was disabled, so connection was refused.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error while trying to create CDN in cloudfront’ 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

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

 * 2 replies
 * 1 participant
 * Last reply from: [chromafunk](https://wordpress.org/support/users/chromafunk/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/error-while-trying-to-create-cdn-in-cloudfront/#post-5341996)
 * Status: not resolved