Skip to content

Amazon S3

Automatically back up signed PDFs to Amazon S3 when all signatures are complete.


  • WPsigner 2.1.0+
  • An AWS account with S3 access
  • An IAM user with s3:PutObject, s3:GetObject, s3:DeleteObject permissions

  1. Go to the AWS S3 Console
  2. Click Create bucket
  3. Choose a name and region
  4. Keep Block all public access enabled (recommended)
  5. Click Create bucket
  1. Go to IAM → Users → Add user
  2. Create a user with Programmatic access
  3. Attach a policy with these permissions:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"
}]
}
  1. Save the Access Key ID and Secret Access Key

Store your Secret Access Key securely. AWS only shows it once during creation. If lost, you must create a new key pair.

  1. Go to WPsigner → Integrations → Amazon S3
  2. Enter your Access Key ID and Secret Access Key
  3. Enter your bucket name and select the region
  4. Optionally change the path prefix (default: wpsigner/)
  5. Click Test Connection to verify
  6. Click Save Settings

When all signers complete their signatures, WPsigner uploads the signed PDF to your S3 bucket using AWS Signature V4 authentication.

EventAction
All signatures completePDF uploaded to s3://bucket/prefix/Title_Date_ID.pdf

The object key is built from the path prefix and a generated file name:

{path_prefix}{sanitized_title}_{date}_{document_id}.pdf
SegmentExampleDescription
{path_prefix}wpsigner/Configurable in settings (default: wpsigner/). Trailing slash is enforced automatically.
{sanitized_title}Service-AgreementDocument title, sanitized for safe file names
{date}2026-03-06Signing date in Y-m-d format
{document_id}142Internal WPsigner document ID

Full key example:

wpsigner/Service-Agreement_2026-03-06_142.pdf

After a successful upload, WPsigner stores a cloud backup reference in the database with the object key, provider name, and upload timestamp. This metadata powers the download feature in the admin panel.


ScenarioConfiguration
Long-term document archivalUse S3 Standard or S3 Glacier for cost-efficient retention
Compliance storage with immutabilityEnable S3 Object Lock on the bucket
Multi-region redundancyEnable cross-region replication on the bucket
Cost-optimized backupPair with S3 Lifecycle rules to transition older files to Glacier
Multi-cloud strategyCombine with Dropbox or OneDrive
Custom folder structureUse the wps_s3_backup_key filter to organize by date, client, or category

ComponentSupported Versions
WPsigner2.1.0+
WordPress6.0+
PHP7.4+
AWS SignatureV4
S3 RegionsAll 21 standard AWS regions
S3 Storage ClassesStandard, Intelligent-Tiering, Glacier (via lifecycle rules)
Max file sizeLimited by PHP memory_limit (single PUT upload)
MultisiteSupported (per-site configuration)

FeatureDetails
AWS Signature V4Requests signed per AWS standard
AES-256-GCMSecret key encrypted at rest in database
Minimal PermissionsOnly PutObject, GetObject, DeleteObject needed
Rate LimitingTest: 5/min, Save: 10/min per user
Nonce VerificationAll AJAX requests verified

IssueCauseSolution
AccessDenied (403)IAM policy missing required actionsVerify s3:PutObject is granted on the correct bucket ARN
NoSuchBucket (404)Bucket name is wrong or bucket was deletedDouble-check the bucket name in WPsigner settings
InvalidAccessKeyIdAccess Key is incorrect or deactivatedVerify the Access Key in IAM Console; create a new one if deactivated
SignatureDoesNotMatchSecret key is incorrect or corruptedRe-enter the Secret Access Key and save
RequestTimeTooSkewedServer clock is more than 15 minutes offSync your server clock with NTP (ntpdate pool.ntp.org)
“Security check failed”Nonce expiredRefresh the page and retry
”Too many requests”Rate limit exceededWait 60 seconds and retry
”Failed to sign request”Credentials not configured or decryption failedRe-enter both the Access Key and Secret Key, then save
Upload succeeds but file not in bucketWrong region selectedEnsure the region in WPsigner matches the bucket’s actual region
Bucket appears empty in consolePath prefix is setNavigate to the wpsigner/ folder inside the bucket
Large files failPHP memory limit too lowIncrease memory_limit in php.ini (recommended: 256M+)

Filter the S3 object key before upload. Use this to implement custom naming, folder structures, or routing logic.

add_filter('wps_s3_backup_key', function ($object_key, $document_id, $document, $provider_id) {
// Only modify for Amazon S3, not Wasabi or R2
if ($provider_id !== 'amazon_s3') {
return $object_key;
}
// Organize by year/month
$year = wp_date('Y');
$month = wp_date('m');
return "wpsigner/{$year}/{$month}/" . basename($object_key);
}, 10, 4);

Parameters:

ParameterTypeDescription
$object_keystringFull S3 object key (e.g., wpsigner/Title_2026-03-06_42.pdf)
$document_idintWPsigner document ID
$documentobjectDocument object with title, status, and other properties
$provider_idstringProvider identifier (amazon_s3, wasabi, or cloudflare_r2)

Action fired after a successful upload.

add_action('wps_s3_uploaded', function ($document_id, $object_key, $provider_id) {
if ($provider_id === 'amazon_s3') {
error_log("Document {$document_id} backed up to S3: {$object_key}");
}
}, 10, 3);

Parameters:

ParameterTypeDescription
$document_idintWPsigner document ID
$object_keystringS3 object key where the file was uploaded
$provider_idstringProvider identifier