Skip to content

Commit

Permalink
Merge pull request #3 from skozawa/feature/aws-endpoint
Browse files Browse the repository at this point in the history
AWS_ENDPOINT指定できるように
  • Loading branch information
koid authored Mar 26, 2021
2 parents 714fd22 + 724060b commit 7441616
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,15 @@ func main() {
}

// kinsumer
sess := session.Must(session.NewSession(aws.NewConfig()))
var sess *session.Session
if len(os.Getenv("AWS_ENDPOINT")) != 0 {
sess = session.Must(session.NewSession(&aws.Config{
Endpoint: aws.String(os.Getenv("AWS_ENDPOINT")),
S3ForcePathStyle: aws.Bool(true),
}))
} else {
sess = session.Must(session.NewSession(aws.NewConfig()))
}
k, err := kinsumer.NewWithSession(
sess,
kinesisStreamName,
Expand Down

0 comments on commit 7441616

Please sign in to comment.