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.

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

Operation Supported
CreateTable
DeleteTable
DescribeTable
ListTables
UpdateTable
Operation Supported
PutItem
GetItem
DeleteItem
UpdateItem
Operation Supported
Query
Scan
Operation Supported
BatchGetItem
BatchWriteItem
TransactGetItems
TransactWriteItems
Operation Supported
UpdateTimeToLive
DescribeTimeToLive
Operation Supported
TagResource
UntagResource
ListTagsOfResource
Operation Supported
DescribeLimits
DescribeEndpoints
Operation Supported
ListStreams
DescribeStream
GetShardIterator
GetRecords
Operation Supported
ExecuteStatement
BatchExecuteStatement
ExecuteTransaction
Operation Supported
DescribeContinuousBackups
UpdateContinuousBackups
Operation Supported
DescribeKinesisStreamingDestination
EnableKinesisStreamingDestination
DisableKinesisStreamingDestination
UpdateKinesisStreamingDestination
Operation Supported
CreateGlobalTable
DescribeGlobalTable
DescribeGlobalTableSettings
ListGlobalTables
UpdateGlobalTable
UpdateGlobalTableSettings
DescribeTableReplicaAutoScaling
UpdateTableReplicaAutoScaling
Operation Supported
CreateBackup
DeleteBackup
DescribeBackup
ListBackups
RestoreTableFromBackup
RestoreTableToPointInTime
ExportTableToPointInTime
ListExports
DescribeExport
ImportTable
ListImports
DescribeImport
Operation Supported
GetResourcePolicy
PutResourcePolicy
DeleteResourcePolicy
Operation Supported
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)
}