Skip to content

KMS

kumolo implements the AWS KMS API. All operations accept standard AWS SDK v2 requests — point your client at http://localhost:5566.

SymbolMeaning
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

Operations sourced from internal/kms/router.go in the kumolo repository.

OperationSupported
CreateKey
DescribeKey
ListKeys
GetKeyPolicy
PutKeyPolicy
OperationSupported
EnableKey
DisableKey
ScheduleKeyDeletion
CancelKeyDeletion
OperationSupported
EnableKeyRotation
DisableKeyRotation
GetKeyRotationStatus
RotateKeyOnDemand
ListKeyRotations
OperationSupported
CreateAlias
DeleteAlias
UpdateAlias
ListAliases
OperationSupported
Encrypt
Decrypt
GenerateDataKey
GenerateDataKeyWithoutPlaintext
GenerateRandom
ReEncrypt
OperationSupported
GetPublicKey
GenerateDataKeyPair
GenerateDataKeyPairWithoutPlaintext
OperationSupported
Sign
Verify
OperationSupported
GenerateMac
VerifyMac
OperationSupported
TagResource
UntagResource
ListResourceTags
OperationSupported
CreateGrant
ListGrants
RevokeGrant
RetireGrant
ListRetirableGrants
FeatureNotes
Custom key storesCloudHSM-backed keys not supported
Multi-region keysMultiRegion: true is accepted but not replicated
Key agreements (DeriveSharedSecret)
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")