KMS
kumolo implements the AWS KMS API. All operations accept standard AWS SDK v2 requests — point your client at http://localhost:5566.
Support levels
Section titled “Support levels”| Symbol | Meaning |
|---|---|
| ✓ | Fully implemented — the feature behaves like real AWS |
| ◐ | Partial support — the operation works but has known limitations; see the note for details |
| — | Not yet implemented |
Operation support
Section titled “Operation support”Operations sourced from internal/kms/router.go in the kumolo repository.
Key management
Section titled “Key management”| Operation | Supported |
|---|---|
CreateKey | ✓ |
DescribeKey | ✓ |
ListKeys | ✓ |
GetKeyPolicy | ✓ |
PutKeyPolicy | ✓ |
Key lifecycle
Section titled “Key lifecycle”| Operation | Supported |
|---|---|
EnableKey | ✓ |
DisableKey | ✓ |
ScheduleKeyDeletion | ✓ |
CancelKeyDeletion | ✓ |
Key rotation
Section titled “Key rotation”| Operation | Supported |
|---|---|
EnableKeyRotation | ✓ |
DisableKeyRotation | ✓ |
GetKeyRotationStatus | ✓ |
RotateKeyOnDemand | ✓ |
ListKeyRotations | ✓ |
Aliases
Section titled “Aliases”| Operation | Supported |
|---|---|
CreateAlias | ✓ |
DeleteAlias | ✓ |
UpdateAlias | ✓ |
ListAliases | ✓ |
Data plane (symmetric)
Section titled “Data plane (symmetric)”| Operation | Supported |
|---|---|
Encrypt | ✓ |
Decrypt | ✓ |
GenerateDataKey | ✓ |
GenerateDataKeyWithoutPlaintext | ✓ |
GenerateRandom | ✓ |
ReEncrypt | ◐ |
Asymmetric keys
Section titled “Asymmetric keys”| Operation | Supported |
|---|---|
GetPublicKey | ✓ |
GenerateDataKeyPair | ◐ |
GenerateDataKeyPairWithoutPlaintext | ◐ |
Sign & verify
Section titled “Sign & verify”| Operation | Supported |
|---|---|
Sign | ◐ |
Verify | ◐ |
| Operation | Supported |
|---|---|
GenerateMac | ✓ |
VerifyMac | ✓ |
Tagging
Section titled “Tagging”| Operation | Supported |
|---|---|
TagResource | ✓ |
UntagResource | ✓ |
ListResourceTags | ✓ |
Grants
Section titled “Grants”| Operation | Supported |
|---|---|
CreateGrant | ✓ |
ListGrants | ✓ |
RevokeGrant | ✓ |
RetireGrant | ✓ |
ListRetirableGrants | ✓ |
Not yet implemented
Section titled “Not yet implemented”| Feature | Notes |
|---|---|
| Custom key stores | CloudHSM-backed keys not supported |
| Multi-region keys | MultiRegion: true is accepted but not replicated |
Key agreements (DeriveSharedSecret) | — |
Quick start
Section titled “Quick start”import ( "context"
"github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/kms")
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion("us-east-1"), config.WithCredentialsProvider( credentials.NewStaticCredentialsProvider("test", "test", ""), ),)if err != nil { panic(err)}
client := kms.NewFromConfig(cfg, func(o *kms.Options) { o.BaseEndpoint = aws.String("http://localhost:5566")})
key, err := client.CreateKey(context.Background(), &kms.CreateKeyInput{ Description: aws.String("my-key"),})if err != nil { panic(err)}
encrypted, err := client.Encrypt(context.Background(), &kms.EncryptInput{ KeyId: key.KeyMetadata.KeyId, Plaintext: []byte("hello, kumolo"),})if err != nil { panic(err)}
decrypted, err := client.Decrypt(context.Background(), &kms.DecryptInput{ CiphertextBlob: encrypted.CiphertextBlob,})if err != nil { panic(err)}_ = decrypted.Plaintext // []byte("hello, kumolo")import boto3
kms = boto3.client( "kms", region_name="us-east-1", endpoint_url="http://localhost:5566", aws_access_key_id="test", aws_secret_access_key="test",)
key = kms.create_key(Description="my-key")key_id = key["KeyMetadata"]["KeyId"]
encrypted = kms.encrypt(KeyId=key_id, Plaintext=b"hello, kumolo")decrypted = kms.decrypt(CiphertextBlob=encrypted["CiphertextBlob"])print(decrypted["Plaintext"]) # b"hello, kumolo"KEY_ID=$(aws kms create-key \ --description "my-key" \ --endpoint-url http://localhost:5566 \ --region us-east-1 \ --query KeyMetadata.KeyId --output text)
CIPHERTEXT=$(aws kms encrypt \ --key-id "$KEY_ID" \ --plaintext fileb://<(printf %s "hello, kumolo") \ --endpoint-url http://localhost:5566 \ --region us-east-1 \ --query CiphertextBlob --output text)
aws kms decrypt \ --ciphertext-blob "$CIPHERTEXT" \ --endpoint-url http://localhost:5566 \ --region us-east-1 \ --query Plaintext --output text | base64 -d