func init()

in services/kinesis-consumer/cmd/main.go [41:62]


func init() {
	region = os.Getenv("AWS_REGION")
	tableName = os.Getenv("TABLE_NAME")

	fmt.Printf("Using region %s\n", region)
	fmt.Printf("Using DynamoDB table %s\n", tableName)

	// Initialize a session in us-west-2 that the SDK will use to load
	// credentials from the shared credentials file ~/.a	ws/credentials.
	sess, err := session.NewSession(&aws.Config{
		Region: aws.String(region)},
	)

	if err != nil {
		fmt.Println("Error creating session:")
		fmt.Println(err.Error())
	}

	// Create DynamoDB client
	svc = dynamodb.New(sess)
	fmt.Printf("DynamoDB client created")
}