diff --git a/aws/session/session.go b/aws/session/session.go index d86ba87..90db387 100644 --- a/aws/session/session.go +++ b/aws/session/session.go @@ -1,11 +1,16 @@ package session -import "github.com/aws/aws-sdk-go/aws/session" +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" +) // NewDynamicSession is a factory to emit sessions // relevant to the current config, ie: // // dev, local, sandbox, production func NewDynamicSession() *session.Session { - return session.Must(session.NewSession()) + return session.Must(session.NewSession( + aws.NewConfig().WithRegion("us-east-1"), + )) } diff --git a/events/publishers/aws/kinesis/kinesis.go b/events/publishers/aws/kinesis/kinesis.go index b664bdd..ce7b20b 100644 --- a/events/publishers/aws/kinesis/kinesis.go +++ b/events/publishers/aws/kinesis/kinesis.go @@ -3,17 +3,16 @@ package kinesis import ( "time" + "github.com/edobtc/cloudkit/aws/session" "github.com/edobtc/cloudkit/config" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/kinesis" log "github.com/sirupsen/logrus" ) -var ApplicationPublisher = NewPublisher() - type Publisher struct { Name string Buffer []byte @@ -21,7 +20,7 @@ type Publisher struct { } func NewPublisher() *Publisher { - s := session.Must(session.NewSession()) + s := session.NewDynamicSession() return &Publisher{ Buffer: []byte{}, @@ -40,7 +39,6 @@ func (s *Publisher) Send(data []byte) error { if err != nil { return err } - log.Debug("Publisher debug: ", po.SequenceNumber) return nil diff --git a/events/subscribers/lightning/eclair/ws/ws.go b/events/subscribers/lightning/eclair/ws/ws.go index f782f80..e6ad5ae 100644 --- a/events/subscribers/lightning/eclair/ws/ws.go +++ b/events/subscribers/lightning/eclair/ws/ws.go @@ -53,7 +53,6 @@ func (s *EclairSubscriber) Start() chan bool { for { select { case msg := <-channel: - fmt.Println("message received: ", msg) s.listener <- msg case <-s.Close: s.Wait <- true