MCPcopy Create free account
hub / github.com/aws-samples/aws-lambda-extensions / GetKey

Function GetKey

cache-extension-demo/plugins/dynamodb.go:113–119  ·  view source on GitHub ↗

Generate key to store in map based with a format "tableName+"-"+hashKeyValue+"-"+sortKeyValue"

(dynamodbConfig DynamodbConfiguration)

Source from the content-addressed store, hash-verified

111
112// Generate key to store in map based with a format "tableName+"-"+hashKeyValue+"-"+sortKeyValue"
113func GetKey(dynamodbConfig DynamodbConfiguration) string {
114 var key = dynamodbConfig.Table + "-" + dynamodbConfig.HashKeyValue
115 if dynamodbConfig.SortKey != "" {
116 key += "-" + dynamodbConfig.SortKeyValue
117 }
118 return key
119}
120
121// Get Dynamodb to read data
122func GetDynamoDbClient() *dynamodb.DynamoDB {

Callers 2

InitDynamodbFunction · 0.85
GetDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected