Commit 9a3dac3e authored by Andreas Muttscheller's avatar Andreas Muttscheller

Move DynamoDB client to method

parent e2acaf76
......@@ -28,11 +28,11 @@ object AwsUtils extends AutoPlugin {
import autoImport._
val ddbClient: AmazonDynamoDB = AmazonDynamoDBClientBuilder.standard.build
val ddb: DynamoDB = new DynamoDB(ddbClient)
def clearDynamoDBTable(tableName: String)(serviceName: String, stage: String): Future[String] = {
Future {
val ddbClient: AmazonDynamoDB = AmazonDynamoDBClientBuilder.standard.build
val ddb: DynamoDB = new DynamoDB(ddbClient)
val fullTableName = s"$serviceName-$stage-$tableName"
println(s"Clearing table $fullTableName")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment