convert tail_kinesis to aws sdk v2
Change-Id: Ia95ea52e094602137b5b591c7635852c70b35372 Reviewed-on: https://gerrit.instructure.com/93023 QA-Review: Simon Williams <simon@instructure.com> Tested-by: Jenkins Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> Reviewed-by: Eric Coan <ecoan@instructure.com>
This commit is contained in:
parent
9760179cad
commit
bd0792d40b
|
@ -33,5 +33,5 @@ Restart Canvas, and events should start flowing to your kinesis stream.
|
|||
You can view the stream with the `tail_kinesis` tool:
|
||||
|
||||
```bash
|
||||
docker-compose run --rm web script/tail_kinesis kinesis 4567 mystream
|
||||
docker-compose run --rm web script/tail_kinesis http://kinesis:4567 mystream
|
||||
```
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
|
||||
require File.expand_path('../../config/boot', __FILE__)
|
||||
|
||||
require 'aws-sdk-v1'
|
||||
require 'aws-sdk'
|
||||
require 'json'
|
||||
require 'pp'
|
||||
|
||||
HOSTNAME = ARGV[0]
|
||||
PORT = ARGV[1]
|
||||
STREAM_NAME = ARGV[2]
|
||||
ENDPOINT = ARGV[0]
|
||||
STREAM_NAME = ARGV[1]
|
||||
REGION = ARGV[2]
|
||||
|
||||
@kinesis = AWS::Kinesis.new(
|
||||
@kinesis = Aws::Kinesis::Client.new(
|
||||
access_key_id: 'key',
|
||||
secret_access_key: 'secret',
|
||||
kinesis_endpoint: HOSTNAME,
|
||||
kinesis_port: PORT,
|
||||
use_ssl: false
|
||||
).client
|
||||
endpoint: ENDPOINT,
|
||||
region: REGION || 'us-east-1'
|
||||
)
|
||||
|
||||
res = @kinesis.get_shard_iterator(
|
||||
stream_name: STREAM_NAME,
|
||||
|
|
Loading…
Reference in New Issue