This example demonstrates how to use AWS KMS to perform Ed25519 signing for Algorand transactions. Includes a mock KMS client for testing when AWS credentials are not available.
Key concepts:
Using AWS KMS for secure key storage and signing
Mock KMS client for local development/testing
Retrieving public key from KMS in SPKI format
Parsing DER-encoded public key to extract raw Ed25519 public key
Implementing RawEd25519Signer with KMS
Generating Algorand address from KMS-managed key
Registering signer with AlgorandClient using set_signer_from_account()
Prerequisites:
AWS credentials configured (for real KMS usage):
AWS_REGION environment variable
KEY_ID environment variable
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (or use OIDC in CI)
boto3 library installed (uv pip install boto3)
For testing without AWS: Mock client will be used automatically