Skip to content

DynamoDB

kumolo implements the DynamoDB REST API. All operations accept standard AWS SDK v2 requests — point your client at http://localhost:5566. Unlike S3, UsePathStyle is not required; only BaseEndpoint needs to be overridden on the client.

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/dynamodb/router.go in the kumolo repository.

OperationSupported
CreateTable
DeleteTable
DescribeTable
ListTables
UpdateTable
OperationSupported
PutItem
GetItem
DeleteItem
UpdateItem
OperationSupported
Query
Scan
OperationSupported
BatchGetItem
BatchWriteItem
TransactGetItems
TransactWriteItems
OperationSupported
UpdateTimeToLive
DescribeTimeToLive
OperationSupported
TagResource
UntagResource
ListTagsOfResource
OperationSupported
DescribeLimits
DescribeEndpoints
OperationSupported
ListStreams
DescribeStream
GetShardIterator
GetRecords
OperationSupported
ExecuteStatement
BatchExecuteStatement
ExecuteTransaction
OperationSupported
DescribeContinuousBackups
UpdateContinuousBackups
OperationSupported
DescribeKinesisStreamingDestination
EnableKinesisStreamingDestination
DisableKinesisStreamingDestination
OperationSupported
CreateGlobalTable
DescribeGlobalTable
ListGlobalTables
UpdateGlobalTable
UpdateGlobalTableSettings
DescribeTableReplicaAutoScaling
UpdateTableReplicaAutoScaling
OperationSupported
CreateBackup
DeleteBackup
DescribeBackup
ListBackups
ExportTableToPointInTime
ListExports
DescribeExport
ImportTable
ListImports
DescribeImport
OperationSupported
DescribeContributorInsights
ListContributorInsights
UpdateContributorInsights
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/dynamodb"
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
)
cfg, err := config.LoadDefaultConfig(context.Background(),
config.WithRegion("us-east-1"),
config.WithCredentialsProvider(
credentials.NewStaticCredentialsProvider("test", "test", ""),
),
)
if err != nil {
panic(err)
}
client := dynamodb.NewFromConfig(cfg, func(o *dynamodb.Options) {
o.BaseEndpoint = aws.String("http://localhost:5566")
})
if _, err = client.CreateTable(context.Background(), &dynamodb.CreateTableInput{
TableName: aws.String("my-table"),
BillingMode: types.BillingModePayPerRequest,
AttributeDefinitions: []types.AttributeDefinition{
{AttributeName: aws.String("pk"), AttributeType: types.ScalarAttributeTypeS},
},
KeySchema: []types.KeySchemaElement{
{AttributeName: aws.String("pk"), KeyType: types.KeyTypeHash},
},
}); err != nil {
panic(err)
}
if _, err = client.PutItem(context.Background(), &dynamodb.PutItemInput{
TableName: aws.String("my-table"),
Item: map[string]types.AttributeValue{
"pk": &types.AttributeValueMemberS{Value: "hello"},
"message": &types.AttributeValueMemberS{Value: "hello, kumolo"},
},
}); err != nil {
panic(err)
}