Title: {eac}Doojigger Simple AWS Extension for WordPress
Author: Kevin Burkholder
Published: <strong>ژانویه 3, 2024</strong>
Last modified: جولای 30, 2025

---

Search plugins

![](https://ps.w.org/eacsimpleaws/assets/banner-772x250.jpg?rev=3016747)

![](https://ps.w.org/eacsimpleaws/assets/icon-256x256.png?rev=3016751)

# {eac}Doojigger Simple AWS Extension for WordPress

 By [Kevin Burkholder](https://profiles.wordpress.org/kevinburkholder/)

[Download](https://downloads.wordpress.org/plugin/eacsimpleaws.1.1.1.zip)

 * [Details](https://azb.wordpress.org/plugins/eacsimpleaws/#description)
 * [Reviews](https://azb.wordpress.org/plugins/eacsimpleaws/#reviews)
 *  [Installation](https://azb.wordpress.org/plugins/eacsimpleaws/#installation)
 * [Development](https://azb.wordpress.org/plugins/eacsimpleaws/#developers)

 [Support](https://wordpress.org/support/plugin/eacsimpleaws/)

## Description

#### Simple AWS

This extension, when enabled, provides easy access to Amazon Web Services (AWS) 
from other plugins, extensions and custom functions through the [AWS SDK for PHP](https://aws.amazon.com/sdk-for-php/).

From the settings page, enter your AWS Region and your IAM account credentials, 
then access AWS programmatically using the provided methods and filters along with
the AWS SDK classes and methods.

Please review:
 + [Policies and permissions in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
+ [Managing access keys for IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)

#### Available Methods

    ```
    getAwsRegion() returns your selected region

    getAwsAccessKey() returns your access key

    getAwsAccessSecret() returns your access secret

    getAwsCredentials() returns a 'credentials' array with your key and secret

    getAwsClientParams() returns an AWS client instantiation array

    getAwsEndpoints() returns a (large) array of all AWS endpoint parameters

    getAwsRegions() returns an array of all regions (name=>description)

    setAwsVersion() override default ('latest') version

    setAwsRegion() override set region

    setAwsEndPoint() override default endpoint
    ```

#### Available Filters

    ```
    SimpleAWS_version returns the AWS version string

    SimpleAWS_region returns your selected region

    SimpleAWS_access_key returns your access key

    SimpleAWS_access_secret returns your access secret

    SimpleAWS_credentials returns a 'credentials' array with your key and secret

    SimpleAWS_client_params returns an AWS client instantiation array

    SimpleAWS_endpoints returns a (large) array of all AWS endpoint parameters

    SimpleAWS_regions returns an array of all regions (name=>description)
    ```

#### Examples

    ```
    `php
    ```

$cloudFront = new Aws\CloudFront\CloudFrontClient([
 ‘version’ => ‘latest’, ‘region’
=> apply_filters(‘SimpleAWS_region’,”), ‘credentials’ => [ ‘key’ => apply_filters(‘
SimpleAWS_access_key’,”), ‘secret’ => apply_filters(‘SimpleAWS_access_secret’,”)]]);

if ($aws = $this->getExtension(‘Simple_AWS’)) {
 $cloudFront = new Aws\CloudFront\
CloudFrontClient([ ‘version’ => ‘latest’, ‘region’ => $aws->getAwsRegion(), ‘credentials’
=> $aws->getAwsCredentials(), ]); }

if ($aws = eacDoojigger()->getExtension(‘Simple_AWS’)) {
 $cloudFront = new Aws\
CloudFront\CloudFrontClient([ ‘version’ => $aws->getAwsVersion(), ‘region’ => $aws-
>getAwsRegion(), ‘credentials’ => $aws->getAwsCredentials(), ]); }

if ($aws = $this->getExtension(‘Simple_AWS’)) {
 $cloudFront = new Aws\CloudFront\
CloudFrontClient( $aws->getAwsClientParams() ); }

if ($aws = eacDoojigger()->getExtension(‘Simple_AWS’)) {
 $cloudFront = new Aws\
CloudFront\CloudFrontClient( $aws->getAwsClientParams() ); }

if ($aws = $this->plugin->getExtension(‘Simple_AWS’)) {
 if ($awsParams = $aws->
getAwsClientParams()) { try { $s3client = new \Aws\S3\S3Client($awsParams); $result
= $s3client->createBucket([ ‘Bucket’ => $bucketName, ]); $result = $s3client->putObject([‘
Bucket’ => $bucketName, ‘Key’ => $fileName, ‘Metadata’ => $metadata, ‘Body’ => json_encode(
$payload,JSON_PRETTY_PRINT), ]); } catch (\AwsException $exception) { $this->logError(
$exception,”AWS S3Client Error”); } } }

    ```
    `
    ```

#### Simple AWS S3 Events

The _Simple AWS S3 Events_ extension is intended to facilitate events through AWS
EventBridge, passing data from and to WordPress/WooCommerce … but you may find other
uses.

 1. A _webhook delivery URL_ is created to be used by WooCommerce to send data (order,
    product, or coupon) as a file to an AWS S3 bucket.
 2. An _EventBridge Target URL_ is created to accepts data from AWS EventBridge derived
    from the file saved to the S3 bucket.

These 2 features may be used by the same WordPress installation (though I’m not 
sure why) or by different, even several, installations to route WooCommerce data
to other destinations.

For example:

    ```
    Site1 \                                                      / EventBridge Target -> Site5
    Site2 -> - WC Webhook Delivery -> [ Site4 ] -> - S3 Bucket ->  EventBridge Target -> Site6
    Site3 /                                                      \ EventBridge Target -> Site7
    ```

One or many WooCommerce sites can use the _WebHook Delivery URL_ of another site
to send orders through that site and then on to an S3 bucket as individual files.

EventBridge can be configured to deliver S3 files to one (or many) WordPress sites
using the _EventBridge Target URL_.

This extension creates the APIs and formats the data to be sent to or received from
AWS. To process data beyond what this extension does, you may use any of these actions:
`
php /** * action _eventbridge_<object|order|product|coupon> * @param object $file–
S3 file object ($file->get(‘Body’) to get contents) * @param array $meta – EventBridge
API metadata * @param string $type – object type (order|product|coupon) * @param
string $name – object file name */ add_action( “eacDoojigger_eventbridge_object”,‘
my_eventbridge_action’, 10, 4 ); add_action( “eacDoojigger_eventbridge_order”, ‘
my_eventbridge_action’, 10, 4 ); add_action( “eacDoojigger_eventbridge_product”,‘
my_eventbridge_action’, 10, 4 ); add_action( “eacDoojigger_eventbridge_coupon”, ‘
my_eventbridge_action’, 10, 4 );

function my_EventBridge_action($file, $payload, $type, $fileName) {
 $data = $file-
>get(‘Body’); } `

**WooCommerce Setup**

WooCommerce Webhooks can be added for Orders, Products, or Coupons. When creating
a new webhook (WooCommerce -> Settings -> Advanced -> Webhooks) use the `Webhook
Delivery URL` and `Webhook Secret` provided by this extension.

**S3 Setup**

This extension, by default, creates a new S3 bucket named `wc-webhook-<your-site-
name>`. To override this or use an existing bucket…
 `php add_action( "eacDoojigger_eventbridge_bucketname",
function($bucketName) { return 'my-s3-bucket'; } );

S3 bucket filenames are `wc_<order|product|coupon>_##.json`, e.g. `wc_order_300.
json`. To override the file name used…
 `php add_action( "eacDoojigger_eventbridge_filename",
function($fileName, $objectType, $objectId) { return 'my_s3_' . $objectType . '_'.
$objectId . '.json'; },10,3 );

When changing the bucket name and/or file name, the _Event pattern_ shown below 
will also have to be changed.

**EventBridge Setup**

There are several steps and configurations needed to get EventBridge working properly.
Below are the key components needed for proper configuration, other options may 
be set to your preferences/needs.

In AWS EventBridge:

 1. EventBridge -> Connections -> Create Connection

 * API type: _Public_
 * Authorization type: _Basic_
 * Username: a WordPress user
 * Password: the application password for the user

alternatively

 * Authorization type: _API Key_
 * API key name: _X-RestAPI-Token_
 * Value: the _Webhook Secret_ provided by this extension

 1. EventBridge -> API Destinations -> Create API destination

 * API destination endpoint: The _EventBridge Target_ URL provided by this extension.
 * HTTP method: _POST_ or _PUT_
 * Connection type: _Use an existing connection_ (select the connection created 
   in step 1)

 1. EventBridge -> Rules -> Create rule (you may create 1 rule for all objects or a
    single rule for each object type)

 * Event bus: _default_
 * Rule type: _Rule with an event pattern_
 * Events, Event source: _Other_
 * Event pattern, Creation method: _Custom pattern (JSON editor)_
 * Event pattern: (defines the beginning part, or prefix, of the bucket name and
   file names)
    `json { "detail": { "bucket": { "name": [{ "prefix": "wc-webhook-"}]},"
   object": { "key": [{ "prefix": "wc_order_" }] } } }
 * Target 1, Target types: _EventBridge API destination_
 * API destination: _Use an existing API destination_ (select the API destination
   created in step 2)

You can add other targets, such as CloudWatch for logging, other WordPress sites
using this extension, or other services that can ingest this data. This extension
provides logging (debug level) to expose detailed data structures.

See also: [How do I create and troubleshoot an Amazon EventBridge rule that triggers on S3 objects or operations?](https://repost.aws/knowledge-center/eventbridge-rule-monitors-s3)
on AWS re:Post.

#### Using AWS [CloudFront](https://aws.amazon.com/cloudfront/) or [Simple Email Service](https://aws.amazon.com/ses/)

 * [{eac}SimpleCDN](https://eacDoojigger.earthasylum.com/eacsimplecdn/)
    An {eac}
   Doojigger extension to enable the use of Content Delivery Network assets on your
   WordPress site, significantly decreasing your page load times and improving the
   user experience.
 * [{eac}SimpleSMTP](https://eacDoojigger.earthasylum.com/eacsimplesmtp/)
    An {eac}
   Doojigger extension to configure WordPress wp_mail and phpmailer to use your 
   SMTP (outgoing) mail server when sending email.

#### Additional Information

{eac}SimpleAWS is an extension plugin to and requires installation and registration
of [{eac}Doojigger](https://eacDoojigger.earthasylum.com/).

See Also:

 * [{eac}SimpleCDN](https://eacDoojigger.earthasylum.com/eacsimplecdn/)
    An {eac}
   Doojigger extension to enable the use of Content Delivery Network assets on your
   WordPress site, significantly decreasing your page load times and improving the
   user experience.
 * [{eac}SimpleSMTP](https://eacDoojigger.earthasylum.com/eacsimplesmtp/)
    An {eac}
   Doojigger extension to configure WordPress wp_mail and phpmailer to use your 
   SMTP (outgoing) mail server when sending email.

### Copyright

#### Copyright © 2023-2025, EarthAsylum Consulting, distributed under the terms of the GNU GPL.

This program is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should receive a copy of the GNU General Public License along with this program.
If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).

## Screenshots

 * [[
 * Simple AWS
 * [[
 * Simple AWS Help

## Installation

**{eac}SimpleAWS** is an extension plugin to and requires installation and registration
of [{eac}Doojigger](https://eacDoojigger.earthasylum.com/).

#### Automatic Plugin Installation

This plugin is available from the [WordPress Plugin Repository](https://wordpress.org/plugins/search/earthasylum/)
and can be installed from the WordPress Dashboard » _Plugins_ » _Add New_ page. 
Search for ‘EarthAsylum’, click the plugin’s [Install] button and, once installed,
click [Activate].

See [Managing Plugins -> Automatic Plugin Installation](https://wordpress.org/support/article/managing-plugins/#automatic-plugin-installation-1)

#### Upload via WordPress Dashboard

Installation of this plugin can be managed from the WordPress Dashboard » _Plugins_»
_Add New_ page. Click the [Upload Plugin] button, then select the eacsimpleaws.zip
file from your computer.

See [Managing Plugins -> Upload via WordPress Admin](https://wordpress.org/support/article/managing-plugins/#upload-via-wordpress-admin)

#### Manual Plugin Installation

You can install the plugin manually by extracting the eacsimpleaws.zip file and 
uploading the ‘eacsimpleaws’ folder to the ‘wp-content/plugins’ folder on your WordPress
server.

See [Managing Plugins -> Manual Plugin Installation](https://wordpress.org/support/article/managing-plugins/#manual-plugin-installation-1)

#### Settings

Once installed and activated options for this extension will show in the ‘AWS’ tab
of {eac}Doojigger settings.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“{eac}Doojigger Simple AWS Extension for WordPress” is open source software. The
following people have contributed to this plugin.

Contributors

 *   [ Kevin Burkholder ](https://profiles.wordpress.org/kevinburkholder/)

[Translate “{eac}Doojigger Simple AWS Extension for WordPress” into your language.](https://translate.wordpress.org/projects/wp-plugins/eacsimpleaws)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/eacsimpleaws/), check
out the [SVN repository](https://plugins.svn.wordpress.org/eacsimpleaws/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/eacsimpleaws/) by
[RSS](https://plugins.trac.wordpress.org/log/eacsimpleaws/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### Version 1.1.1 – Jul 30, 2025

 * Updated AWS PHP SDK to version 3.351.10

#### Version 1.1.0 – Apr 29, 2025

 * New `Simple AWS S3 Events` extension.
    - Webhook for WooCommerce; REST endpoint for AWS EventBridge.
 * Moved from `General` to `AWS` tab.

#### Version 1.0.3 – Apr 19, 2025

 * Updated AWS PHP SDK to version 3.342.28
 * Compatible with WordPress 6.8.
 * Prevent `_load_textdomain_just_in_time was called incorrectly` notice from WordPress.
    - All extensions – via eacDoojigger 3.1.
    - Modified extension registration in constructor.

#### Version 1.0.2 – April 10, 2024

 * Added notice if activated without {eac}Doojigger.
 * Updated AWS PHP SDK to version 3.304.1

#### Version 1.0.1 – September 9, 2023

 * Updated include file to prevent direct access.
 * Updated AWS PHP SDK to version 3.281.3

#### Version 1.0.0 – June 3, 2023

 * Initial release.

## Meta

 *  Version **1.1.1**
 *  Last updated **8 آی‌لار ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.8 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/eacsimpleaws/)
 * Tags
 * [amazon web services](https://azb.wordpress.org/plugins/tags/amazon-web-services/)
   [aws](https://azb.wordpress.org/plugins/tags/aws/)
 *  [Advanced View](https://azb.wordpress.org/plugins/eacsimpleaws/advanced/)

## Ratings

No reviews have been submitted yet.

[Add my review](https://wordpress.org/support/plugin/eacsimpleaws/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/eacsimpleaws/reviews/)

## Contributors

 *   [ Kevin Burkholder ](https://profiles.wordpress.org/kevinburkholder/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/eacsimpleaws/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://github.com/sponsors/EarthAsylum)