Skip to content

Commit b83f73a

Browse files
committed
updated the Kotlin DynamoDB to use Billing Mode
1 parent 3183d9e commit b83f73a

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import aws.sdk.kotlin.services.dynamodb.model.BillingMode
1010
import aws.sdk.kotlin.services.dynamodb.model.CreateTableRequest
1111
import aws.sdk.kotlin.services.dynamodb.model.KeySchemaElement
1212
import aws.sdk.kotlin.services.dynamodb.model.KeyType
13-
import aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughput
1413
import aws.sdk.kotlin.services.dynamodb.model.ScalarAttributeType
1514
import aws.sdk.kotlin.services.dynamodb.waiters.waitUntilTableExists
1615
import kotlin.system.exitProcess

kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/scenario/Scenario.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
3535
*/
3636

3737
// snippet-start:[dynamodb.kotlin.scenario.main]
38-
suspend fun main(args: Array<String>) {
38+
suspend fun main() {
3939
val tableName = "Movies"
4040
val fileName = "../../../resources/sample_files/movies.json"
4141
val partitionAlias = "#a"

kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/scenario/ScenarioPartiQ.kt

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,10 @@ import kotlin.system.exitProcess
3333
*/
3434

3535
// snippet-start:[dynamodb.kotlin.scenario.partiql.main]
36-
suspend fun main(args: Array<String>) {
37-
val usage = """
38-
Usage:
39-
<fileName>
40-
41-
Where:
42-
fileName - The path to the moviedata.json file You can download from the Amazon DynamoDB Developer Guide.
43-
"""
44-
45-
if (args.size != 1) {
46-
println(usage)
47-
exitProcess(1)
48-
}
49-
36+
suspend fun main() {
5037
val ddb = DynamoDbClient { region = "us-east-1" }
5138
val tableName = "MoviesPartiQ"
52-
53-
// Get the moviedata.json from the Amazon DynamoDB Developer Guide.
54-
val fileName = args[0]
39+
val fileName = "../../../resources/sample_files/movies.json"
5540
println("Creating an Amazon DynamoDB table named MoviesPartiQ with a key named id and a sort key named title.")
5641
createTablePartiQL(ddb, tableName, "year")
5742
loadDataPartiQL(ddb, fileName)

0 commit comments

Comments
 (0)