How To Fix ‘Caught exception in method AmazonAI_Cloudformation::get_dv_dns_info in class AmazonAI_Cloudformation:’

Table of Contents

Did you encounter this annoying error while setting up your new WordPress website? This error is seen in the AWSforWordpress plugin setup.

AWS has a good development team on its side. And they did a very good job in developing plugins that help WordPress users to move to Amazon Lightsail and use its features.

If you don't know about Amazon Lightsail, it's a virtual private server offered by Amazon at affordable prices. Their prices start very small from $3.50 per month with 1 static IP, 512MB memory, and 1 core processor.


Being a vivid user of Amazon's EC2 servers for years now, I was a little hesitant to use this new service from the AWS team. I was sure that they will do it well but still, I was not sure of how good their documentations are for this new service.

Finally last month I gave Lightsail a chance as this product got pretty matured and I gave a brief look into their documentation before jumping in.

Started with the smallest virtual server of 512MB RAM for a small site of mine where we do a lot of SEO tests before implementing any new strategy for our UnderWP's digital marketing clients.

The whole setup went pretty smooth about which I might write up soon in another post. But there was this one point where I got stuck with a nasty error.

The Problem

I found this error when creating a new CloudFront distribution for the website on Amazon Lightsail.


The DNS was being handled by Cloudflare. Unfortunately, AWS documentation does not cover how to handle the DNS when managed by Cloudflare.

They are more in favor of their own DNS management module, Amazon Route 53. It is a wonderful tool to handle all your DNS queries. But personally, I am more in favor of Cloudflare when it comes to DNS.

After going through their documentation for over 2 days here: no help was found.

To solve this error, I found the problem was not in the plugin. Because I also read through their plugin which is open source and available on Github for everyone to read:

This is when I realize that maybe the problem was in Cloudflare.

The Solution

This error can be solved like this. Go to your Cloudflare account and into the DNS management of the domain you are configuring.

When you are adding the CNAME values provided by the AWSforWordPress plugin. Make sure to switch off the Proxy status option in your Cloudflare dashboard.


Once this was done, click on the Check status of Cloudfront certificate button on your WordPress dashboard. After a few seconds, you will see that the plugin was successfully able to verify the certificate and goes to the next step of CloudFront Distribution Deployment.

Final Words

This post is to address this error for anyone who faces this error when handling Amazon Lightsail services. If only this error would have been covered in their documentation, I wouldn't have had to write about it.

Overall setting up the Lightsail server for a website has been made an effortless work compared to setting up on EC2 servers by the AWS team. Only this small issue happened when trying to get their additional Cloudfron services to activate on the new website. Hopefully, this will also be addressed and patched up by their team in the future.

Let me know in the comments if this has helped you.

Share This Article:
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp
Share on email
Share on reddit
Related Articles:
bigcommerce google shopping
BigCommerce Integrated With Google’s Shopping Features

BigCommerce has a merchants base of more than 60,000 on its platform. These merchants or sellers on BigCommerce range from small businesses to big companies that sell their products on this platform. In a recent announcement from Google, it is now free to show up your products on Google shopping

Read More »
migrate wordpress to aws
Migrating WordPress Website To Lightsail On AWS – Part 2

In the previous post of this series, we have learned how to set up the AWS Lightsail servers to be ready for the WordPress website. If you haven’t read this post yet, we highly recommend you give it a read here: So far we have set up the server

Read More »
restore wordpress backup
How To Restore WordPress From Backup

The internet is full of hackers and vulnerabilities. Creating backups and restoring the WordPress website is an important step that every webmaster should follow. There might be situations when you need to restore your WordPress website with the backups you created the last time. We wrote this guide as a

Read More »
No Nonsense. Just Really Good Marketing Insights

Sign up to get free weekly resources.

5 Responses

  1. Setting up cloudfront is always a pain on WordPress due to the lack of good plugins. But with this plugin from AWS itself, it has become easy.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: