Skip to content

Commit 24390a9

Browse files
committed
fix examples and kinesis cli to use the new Auth interface
1 parent a9c9545 commit 24390a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ func main() {
4646

4747
streamName := "test"
4848
// set env variables AWS_ACCESS_KEY and AWS_SECRET_KEY AWS_REGION_NAME
49-
auth := kinesis.NewAuth()
50-
ksis := kinesis.New(&auth, kinesis.Region{})
49+
auth := kinesis.NewAuthFromEnv()
50+
ksis := kinesis.New(auth, kinesis.Region{})
5151

5252
err := ksis.CreateStream(streamName, 2)
5353
if err != nil {

kinesis-cli/kinesis-cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ func bigIntFromStr(s string, base int) *big.Int {
238238

239239
func newClient() kinesis.KinesisClient {
240240
// NOTE: kinesis.client.go sets auth from env when empty.
241-
auth := kinesis.NewAuth()
242-
return kinesis.New(&auth, kinesis.Region{})
241+
auth := kinesis.NewAuthFromEnv()
242+
return kinesis.New(auth, kinesis.Region{})
243243
}
244244

245245
func askForShardStartHash(streamName, shardId string) string {

0 commit comments

Comments
 (0)