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.

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

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

Operation Supported
CreateKey
DescribeKey
ListKeys
GetKeyPolicy
PutKeyPolicy
ListKeyPolicies
UpdateKeyDescription
GetKeyLastUsage
Operation Supported
EnableKey
DisableKey
ScheduleKeyDeletion
CancelKeyDeletion
Operation Supported
EnableKeyRotation
DisableKeyRotation
GetKeyRotationStatus
RotateKeyOnDemand
ListKeyRotations
Operation Supported
CreateAlias
DeleteAlias
UpdateAlias
ListAliases
Operation Supported
Encrypt
Decrypt
GenerateDataKey
GenerateDataKeyWithoutPlaintext
GenerateRandom
ReEncrypt
Operation Supported
GetPublicKey
GenerateDataKeyPair
GenerateDataKeyPairWithoutPlaintext
Operation Supported
Sign
Verify
Operation Supported
GenerateMac
VerifyMac
Operation Supported
TagResource
UntagResource
ListResourceTags
Operation Supported
CreateGrant
ListGrants
RevokeGrant
RetireGrant
ListRetirableGrants
Operation Supported
GetParametersForImport
ImportKeyMaterial
DeleteImportedKeyMaterial
Operation Supported
DeriveSharedSecret
Operation Supported
ReplicateKey
UpdatePrimaryRegion
Operation Supported
CreateCustomKeyStore
DescribeCustomKeyStores
UpdateCustomKeyStore
DeleteCustomKeyStore
ConnectCustomKeyStore
DisconnectCustomKeyStore
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")