前言介紹
- 這款 WordPress 外掛「{eac}Doojigger Simple AWS Extension for WordPress」是 2024-01-02 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2025-05-01,距離現在已有 3 天。
- 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
aws | S3 Bucket | AWS PHP SDK | EventBridge | amazon web services |
內容簡介
總結文案:
- 一旦啟用,AWS服務可以輕鬆從其他插件、擴展和自定義功能中訪問。
- 從設置頁面,您可以輸入您的AWS區域和IAM帳戶憑據以進行程式化訪問。
問題與答案:
- 有哪些可用方法?
- getAwsRegion():返回您選擇的區域
- getAwsAccessKey():返回您的訪問密鑰
- getAwsAccessSecret():返回您的訪問密鑰密碼
- getAwsCredentials():返回一個帶有您的金鑰和密碼的'credentials'數組
- getAwsClientParams():返回一個AWS客戶端實例化數組
- getAwsEndpoints():返回一個(較大的)包含所有AWS端點參數的數組
- getAwsRegions():返回一個包含所有區域(名稱=>描述)的數組
- setAwsVersion():覆蓋默認('latest')版本
- setAwsRegion():覆蓋設置的區域
- setAwsEndPoint():覆蓋默認端點
- 有哪些可用的過濾器?
- SimpleAWS_version:返回AWS版本字符串
- SimpleAWS_region:返回您選擇的區域
- SimpleAWS_access_key:返回您的訪問密鑰
- SimpleAWS_access_secret:返回您的訪問密鑰密碼
- SimpleAWS_credentials:返回一個帶有您的金鑰和密碼的'credentials'數組
- SimpleAWS_client_params:返回一個AWS客戶端實例化數組
- SimpleAWS_endpoints:返回一個(較大的)包含所有AWS端點參數的數組
- SimpleAWS_regions:返回一個包含所有區域(名稱=>描述)的數組
- 請提供一些例子:
- 使用apply_filters('SimpleAWS_region','')指定區域、access_key和access_secret的例子
- 使用獲取擴展並使用getAwsRegion()和getAwsCredentials()設置區域和憑據的例子
- 使用getAwsVersion()、getAwsRegion()和getAwsCredentials()設置版本、區域和憑據的例子
- 使用獲取擴展並使用getAwsClientParams()設置AWS客戶端實例化的例子
- 附加信息:
- {eac}SimpleAWS是{eac}Doojigger的擴展插件,需要安裝和註冊。
- 版權:版權所有 © 2023,EarthAsylum Consulting,根據GNU GPL的條款進行分發。此程序是自由軟件,您可以根據GNU General Public License的條款重製和修改它,無保證責任。如果您沒有收到GNU General Public License的副本,請訪問https://www.gnu.org/licenses/。
原文外掛簡介
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.
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
+ Managing access keys for IAM users
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.
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.
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_
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
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)
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? on AWS re:Post.
Using AWS [CloudFront](https://aws.amazon.com/cloudfront/) or [Simple Email Service](https://aws.amazon.com/ses/)
{eac}SimpleCDN
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
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.
See Also:
{eac}SimpleCDN
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
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/.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「{eac}Doojigger Simple AWS Extension for WordPress」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.1 | 1.0.2 | 1.0.4 | 1.1.0 | trunk |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。