masaka is a user on kamiyacho.net. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
masaka @masaka

kinesis data streamなかなか面白い。。。

· Web · 0 · 0

@masaka そこまだ手を出せてないんすよね

@sakurai kinesis data streamにステータス変更情報を送るように設定し、aws cliを使ってkinesisからそのデータ取り出す、ってところまでは割とサクッとできましたですよ

@masaka それソフトフォンのステータスをキネシスったんですか?

@sakurai キネシすりましたよ。というかキネシスに送る事自体は数クリックですが、データ取り出すのをaws cliでやるのが慣れなくて苦労しましたが、そこは突破しました。

まずはこちらをお読みください(と、AWSのサポートに言われたw

■Amazon Connect エージェントイベントストリーム - Amazon Connect ▽docs.aws.amazon.com/ja_jp/conn 

@sakurai aws cliで、エージェントステータスを取り出すコマンドラインはこんな感じ

aws kinesis get-records --shard-iterator $(aws kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name test | jq -r .ShardIterator) | jq -r ".Records[4].Data"|base64 -D|jq -r .CurrentAgentSnapshot.AgentStatus

参考にしたのはこれとかかな

■【AWS】Kinesis上のデータを取得するワンライナー【Kinesis Stream】 - Qiita ▽qiita.com/tmiki/items/1803f00f