PHPackages                             setasign/setapdf-signer-addon-aws-kms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. setasign/setapdf-signer-addon-aws-kms

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

setasign/setapdf-signer-addon-aws-kms
=====================================

A SetaPDF-Signer component signature module for the AWS Key Management Service.

v1.1.2(3mo ago)418.1k↓29.4%MITPHPPHP &gt;=8.1 &lt;=8.5.99999CI passing

Since Feb 2Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Setasign/SetaPDF-Signer-Addon-AWS-KMS)[ Packagist](https://packagist.org/packages/setasign/setapdf-signer-addon-aws-kms)[ Docs](https://github.com/Setasign/SetaPDF-Signer-Addon-AWS-KMS)[ RSS](/packages/setasign-setapdf-signer-addon-aws-kms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

SetaPDF-Signer component module for the AWS KMS.
================================================

[](#setapdf-signer-component-module-for-the-aws-kms)

This package offers a module for the [SetaPDF-Signer](https://www.setasign.com/signer) component that allow you to use the [AWS Key Management Service](https://aws.amazon.com/kms/) to **digital sign PDF documents in pure PHP**.

Requirements
------------

[](#requirements)

This package uses the official [AWS SDK for PHP Version 3](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html)to communicate with the KMS. You need appropriate credentials.

You also need a X.509 certificates related to your stored keys. To create a self-signed certificate for testing purpose or to create a CSR for the certificate authority of your choice, you can use a tool we prepared [here](https://github.com/Setasign/Cloud-KMS-CSR).

The current version of the package is developed and tested on PHP &gt;= 8.1 up to PHP 8.5. Requirements of the [SetaPDF-Signer](https://www.setasign.com/signer) component can be found [here](https://manuals.setasign.com/setapdf-signer-manual/getting-started/#index-1).

Installation
------------

[](#installation)

Add following to your composer.json:

```
{
    "require": {
        "setasign/setapdf-signer-addon-aws-kms": "^1.0"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://www.setasign.com/downloads/"
        }
    ]
}
```

and execute `composer update`. You need to define the `repository` to evaluate the dependency to the [SetaPDF-Signer](https://www.setasign.com/signer) component (see [here](https://getcomposer.org/doc/faqs/why-can%27t-composer-load-repositories-recursively.md) for more details).

The Setasign repository requires authentication data: You can use your credentials of your account at [setasign.com](https://www.setasign.com) to which your licenses are assigned or use an access token which you can create in your personal [composer settings](https://www.setasign.com/my-setasign/composer-settings/#bearer-authentication)on setasign.com. See [here](https://getcomposer.org/doc/articles/authentication-for-private-packages.md#http-basic)for more options for authentication with composer.

**You have to define your credentials for AWS KMS as documented [here](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_default_chain.html).**

Usage
-----

[](#usage)

All classes in this package are located in the namespace `setasign\SetaPDF\Signer\Module\AwsKms`.

### The `Module` class

[](#the-module-class)

This is the main signature module which can be used with the [SetaPDF-Signer](https://www.setasign.com/signer)component.

A simple complete signature process would look like this:

```
use Aws\Kms\KmsClient;
use setasign\SetaPDF\Signer\Module\AwsKMS\Module;
use setasign\SetaPDF2\Core\Document;
use setasign\SetaPDF2\Core\Writer\FileWriter;
use setasign\SetaPDF2\Signer\Signer;

$kmsClient = new KmsClient([
    'region' => $region,
    'version' => $version,
]);
$awsKmsModule = new Module($keyId, $kmsClient);

$cert = file_get_contents('your-cert.crt');
$awsKmsModule->setCertificate($cert);
$awsKmsModule->setSignatureAlgorithm($algorithm);

// the file to sign
$fileToSign = __DIR__ . '/Laboratory-Report.pdf';

// create a writer instance
$writer = new FileWriter('signed.pdf');
// create the document instance
$document = Document::loadByFilename($fileToSign, $writer);

// create the signer instance
$signer = new Signer($document);
$signer->sign($awsKmsModule);
```

Make sure that you pass `$algorithm` value which match the configuration of the key in the KMS.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance86

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~606 days

Total

4

Last Release

112d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.6

v1.1.2PHP &gt;=8.1 &lt;=8.5.99999

### Community

Maintainers

![](https://www.gravatar.com/avatar/78b46f7020bdcd25e761812659988691e50aba9a25b2a48ea33f6137f2fc2536?d=identicon)[Setasign](/maintainers/Setasign)

---

Top Contributors

[![MaximilianKresse](https://avatars.githubusercontent.com/u/545671?v=4)](https://github.com/MaximilianKresse "MaximilianKresse (23 commits)")[![JanSlabon](https://avatars.githubusercontent.com/u/12390057?v=4)](https://github.com/JanSlabon "JanSlabon (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")

---

Tags

aws-kmsdigital-signaturepdfphpsetapdfsetapdf-signersignature

### Embed Badge

![Health badge](/badges/setasign-setapdf-signer-addon-aws-kms/health.svg)

```
[![Health](https://phpackages.com/badges/setasign-setapdf-signer-addon-aws-kms/health.svg)](https://phpackages.com/packages/setasign-setapdf-signer-addon-aws-kms)
```

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.2k57.6M131](/packages/openspout-openspout)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)[omaralalwi/gpdf

Custom PDF wrapper supporting Arabic language

15411.6k](/packages/omaralalwi-gpdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
