1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AWS IoT CoreのMQTTテストクライアントに対して、Windowsのコマンドプロンプトからメッセージをパブリッシュする

Last updated at Posted at 2024-11-04

#AWS CLIを使う方法

aws --region us-east-1 iot-data publish --topic "YOUR_TOPIC" --cli-binary-format raw-in-base64-out --payload "{\"key\": \"value\"}"

https://www.amazon.co.jp/gp/product/B0B9P325F7/ref=ppx_yo_dt_b_d_asin_title_351_o05?ie=UTF8&psc=1
のChap1 step5に書いてあった。

aws configure

aws iot describe-endpoint --endpoint-type iot:Data-ATS

でhome regionに設定してあれば--regionの記載も不要です。

aws iot-data publish --topic "YOUR_TOPIC" --cli-binary-format raw-in-base64-out --payload "{\"key\": \"value\"}"

jsonファイルを指定する場合は、

aws iot-data publish --topic "YOUR_TOPIC" --cli-binary-format raw-in-base64-out --payload file://sample.json

ちなみにBashで連続したFake messageを送信する場合の例
https://aws.amazon.com/blogs/iot/integrating-iot-data-with-your-data-lake-with-new-aws-iot-analytics-features/

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?