func RecreateTable()

in workload-management/s3-trigger-ecs-task/s3-file-processor/utils/Dynamodb.go [32:51]


func RecreateTable() error {
	var (
		status *string
		err    error
	)

	// Get TableStatus
	status, _ = getTableStatus()

	if status == nil || *status != "ACTIVE" {
		// Create table
		err = createTable()
		if err != nil {
			log.Printf("Error while creating table %s", err.Error())
			return err
		}
	}

	return nil
}