• Resolved sebastiaan7676

    (@sebastiaan7676)


    Hi there,
    I installed AWS for WordPress Plugin, and was able ( after a few goes ) to get a distribution setup, and enabled. However, I wanted to change some things in my DNS for origin and other things, so I figured I’d delete the Cloudformation stack and corresponding cloudfront distribution, certificates manually while i was in the AWS console.

    This was probably stupid, as now I can’t re-run the setup on the plugin.

    When I go to the Plugin page I just see:

    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    The email in the inbox says:

    rror Details
    =============
    An error of type E_ERROR was caused in line 195 of the file /var/www/html/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php. Error message: Uncaught exception ‘Aws\CloudFront\Exception\CloudFrontException’ with message ‘Error executing “GetDistribution” on “https://cloudfront.amazonaws.com/2019-03-26/distribution/E3THJ3VOUCTQ3E”; AWS HTTP error: Client error: GET https://cloudfront.amazonaws.com/2019-03-26/distribution/E3THJ3VOUCTQ3E resulted in a 403 Forbidden response:

    Sender< (truncated…)
    AccessDenied (client): User: arn:aws:iam::009442257955:user/AWSForWordPressPlugin is not authorized to perform: cloudfront:GetDistribution on resource: arn:aws:cloudfront::009442257955:distribution/E3THJ3VOUCTQ3E –
    SenderAccessDeniedUser: arn:aws:iam::009442257955:user/AWSForWordPressPlugin is not authorized to perform: cloudfront:GetDistribution on resource: arn:aws:cloudfront::009442257955:distribution/E3TH

    If I login to the provided recovery mode link and go to the plugin I see:

    an error of type E_ERROR was caused in line 195 of the file /var/www/html/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php. Error message: Uncaught exception ‘Aws\CloudFront\Exception\CloudFrontException’ with message ‘Error executing “GetDistribution” on “https://cloudfront.amazonaws.com/2019-03-26/distribution/E3THJ3VOUCTQ3E&#8221;; AWS HTTP error: Client error: GET https://cloudfront.amazonaws.com/2019-03-26/distribution/E3THJ3VOUCTQ3E resulted in a 404 Not Found response: Sender< (truncated…) NoSuchDistribution (client): The specified distribution does not exist. – SenderNoSuchDistributionThe specified distribution does not exist.3d8c830b-b581-4681-8535-1a15a99d616e’ GuzzleHttp\Exception\ClientException: Client error: GET https://cloudfront.amazonaws.com/2019-03-26/distribution/E3THJ3VOUCTQ3E resulted in a 404 Not Found response:
    Select All

    I gather the issue is that the plugin, somewhere has the distribution address stored and is attempting to load it, and as it wasn’t used to delete everything, it’s now got this info which of course is no longer there.

    Only issue is, i don’t know how to figure out how to ‘reset’ this, or get rid of it. Is this stored in the mysql database somewhere? Why doesn’t this get deleted when the plugin is un-installed?

    I’ve tried:
    – Removing all DNS CNAME entries that were created during the setup and reverting back to what they were prior to installation of the plugin.
    – Creating a new IAM User
    – Confirming Permissions for the IAM user
    – deactivating and reactivating the plugin
    – deleting and re-installing the plugin
    – restarting the webserver
    – rebooting the entire VM that hosts the webserver
    – deleting browser cache, cookies and using a totally fresh browser

    But nothing seems to work.

    How can I completely remove every single remnant of this plugin, and start again from scratch? IN particular, where is this plugin getting this now, deleted distribution URL from? It must be stored somewhere on my WP install. It’s definitely gone from my AWS environment, that’s for sure!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The plugin information is stored in wp_options table and persists even if you deactivate and delete the plugin. I removed all rows where the option_name was like ‘ amazon_ %’

    Was able to re-run setup after that

    Plugin Contributor tstachlewski

    (@tstachlewski)

    Fyi. I’ve notified team who is responsible for CloudFront functionality.

    Thread Starter sebastiaan7676

    (@sebastiaan7676)

    OK. So I wasn’t going mad, and looks like I found a bug in the Uninstall function in that case.

    Good find @nprocope!

    The upside to this is, it forced me to learn how to set it up manually and actually know what is going on :).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AWS for WordPress: Deleted distribution manually – now critical error’ is closed to new replies.