Search by

kinetis / aws-sigv4

A PSR-18 client that signs outgoing requests with AWS Signature Version 4 (SigV4) for one configured origin — reused signing logic from async-aws/core, non-blocking via kinetis/revolt-http-client. Usable standalone, not only with Kinetis.

Maintainers

Package info

github.com/kinetis-dev/aws-sigv4

pkg:composer/kinetis/aws-sigv4

Transparency log

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-09-05 12:32 UTC

This package is auto-updated.

Last update: 2026-09-05 12:40:41 UTC


README

Kinetis

kinetis/aws-sigv4
A PSR-18 client that signs requests with AWS Signature Version 4

Packagist Version Packagist Downloads PHP Version License CI

Part of Kinetis, a non-blocking PHP framework for API-first applications, developed in the kinetis-dev/kinetis monorepo.

A PSR-18 HTTP client that signs every outgoing request with AWS Signature Version 4 (SigV4) and sends it to one configured origin — the signing math is AsyncAws\Core\Signer\SignerV4, the same class every AsyncAws service client uses internally, reused directly rather than reimplemented. Usable outside Kinetis entirely, the same relationship kinetis/revolt-http-client already has with the wider PHP ecosystem.

use Kinetis\AwsSigV4\SigV4SigningClient;

$signedClient = new SigV4SigningClient(
    origin: 'https://search-my-domain.us-east-1.es.amazonaws.com',
    region: 'us-east-1',
    service: 'es', // Amazon OpenSearch Service's signing name
);

$response = $signedClient->sendRequest($request);

$origin is the only scheme, host, and port this client will sign for, with an optional path prefix that binds every request. A relative request resolves against it; anything else — another host, another port, an http target under an https origin, a path that leaves the prefix — is rejected before credentials are resolved, before the body is read, and before the network is touched. The target is put into the exact form it will be sent in before both the check and the signature, so the signature covers the bytes that go out. A 3xx response is returned as it is: nothing is re-signed and no Location is followed, for the signed request or for the credential lookups.

$service is the AWS signing service name ("es" for Amazon OpenSearch Service, "execute-api" for API Gateway, and so on) — required, with no default, since guessing wrong produces a signature that fails verification rather than an obvious error.

Credentials

Resolved through AsyncAws's own default provider chain (AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY, a shared credentials file, or an IAM role) unless a CredentialProvider is passed as the fourth constructor argument.

Installation

composer require kinetis/aws-sigv4

Requires PHP 8.4+ and kinetis/revolt-http-client. Full documentation, including the origin grammar, failure behavior, and what is buffered or blocking: kinetis.dev/docs/aws-sigv4.html.

License

MIT — see LICENSE.