SlideShare a Scribd company logo
1 of 9
# コピペ用コマンド
# AWS IoT
aws iot create-thing --thing-name raspi2
aws iot create-keys-and-certificate --set-as-active |tee cert.json
certificateArn=$(jq -r .certificateArn < cert.json)
jq -r .certificatePem < cert.json | tee cert.pem
jq -r .keyPair.PrivateKey < cert.json | tee key.pem
aws iot create-policy --policy-name "PubSubToAnyTopic" --policy-document '{"Version":"2012-10-
17","Statement":[{"Effect":"Allow","Action":["iot:*"],"Resource":["*"]}]}'
aws iot attach-principal-policy --principal $certificateArn --policy-name "PubSubToAnyTopic"
aws iot attach-thing-principal --thing-name raspi2 --principal $certificateArn
curl -o ca.pem https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-
Authority-G5.pem
cat rule.json
{
"ruleDisabled": false,
"sql": "SELECT * FROM 'beam2iot'",
"description": "publish message to SNS",
"actions": [
{
"sns": {
"targetArn": "arn:aws:sns:ap-northeast-1:903921708000:beam2iot",
"roleArn": "arn:aws:iam::903921708000:role/aws_iot_sns"
}
}
]
}
aws iot create-topic-rule --rule-name beam2iot --topic-rule-payload file://rule.json
# Beam
soracom group create --tags name:AWSIoT | tee group.json
group_id=$(jq -r .groupId < group.json)
curl -O
https://gist.githubusercontent.com/j3tm0t0/ba69a1a6f7af3b976c64/raw/b29a19347c08a7e06bb1c6ff3a20c822c8e1d572/B
eam_to_AWSIoT.rb
ruby Beam_to_AWSIoT.rb key.pem cert.pem ca.pem $group_id
imsi=001010000000000
soracom sim set_group --imsi $imsi --group-id $group_id
# on Raspberry Pi
cat random.sh
#!/bin/bash
wait=$1
if [ "$wait" = "" ]
then
wait=5
fi
while [ 1 ]
do
timestamp=$(date +%s)
cat <<EOF
{"id":$RANDOM,"timestamp":$timestamp,"a":$RANDOM,"b":$RANDOM,"c":$RANDOM}
EOF
sleep $wait
done
./random.sh | mosquitto_pub -d -h beam.soracom.io -t topic –l
# on Mac
while [ 1 ] ; do aws sqs receive-message --queue-url https://sqs.ap-northeast-1.amazonaws.com/000000000000/beam2iot
--wait-time-seconds 20 | jq -r '.Messages[].Body' | jq -r .Message ; sleep 1 ; done
SORACOM Beam から AWS IoT へのデータ送信

More Related Content

What's hot

Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchKeira Zhou
 
DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...
DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...
DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...DevOps_Fest
 
Хокку про Heroku
Хокку про HerokuХокку про Heroku
Хокку про HerokuSerge Seletskyy
 
Rails with MongoDB - RORLab 47th
Rails with MongoDB - RORLab 47th Rails with MongoDB - RORLab 47th
Rails with MongoDB - RORLab 47th Eugene Park
 
IoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQLIoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQLBlaine Carter
 
Effective iOS Network Programming Techniques
Effective iOS Network Programming TechniquesEffective iOS Network Programming Techniques
Effective iOS Network Programming TechniquesBen Scheirman
 
[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera
[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera
[Hyperlogy - Tài liệu Workshop] Real time log analytics with clouderaHyperlogy Corporation
 
Let us make clear the aws directconnect
Let us make clear the aws directconnectLet us make clear the aws directconnect
Let us make clear the aws directconnectTomoaki Hira
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門lestrrat
 
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...mCloud
 
Testing multi outputformat based mapreduce
Testing multi outputformat based mapreduceTesting multi outputformat based mapreduce
Testing multi outputformat based mapreduceAshok Agarwal
 
Info 2402 assignment 2_ crawler
Info 2402 assignment 2_ crawlerInfo 2402 assignment 2_ crawler
Info 2402 assignment 2_ crawlerShahriar Rafee
 
Node.js 與 google cloud storage
Node.js 與 google cloud storageNode.js 與 google cloud storage
Node.js 與 google cloud storageonlinemad
 
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018Angelo Gino Varrati
 

What's hot (20)

Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & Elasticsearch
 
nginx mod PSGI
nginx mod PSGInginx mod PSGI
nginx mod PSGI
 
Hadoop 설치
Hadoop 설치Hadoop 설치
Hadoop 설치
 
RingoJS
RingoJSRingoJS
RingoJS
 
DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...
DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...
DevOps Fest 2019. Сергей Марченко. Terraform: a novel about modules, provider...
 
Хокку про Heroku
Хокку про HerokuХокку про Heroku
Хокку про Heroku
 
Rails with MongoDB - RORLab 47th
Rails with MongoDB - RORLab 47th Rails with MongoDB - RORLab 47th
Rails with MongoDB - RORLab 47th
 
Installing GravCMS
Installing GravCMSInstalling GravCMS
Installing GravCMS
 
IoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQLIoT to the Database: Soldering, Python and a little PL/SQL
IoT to the Database: Soldering, Python and a little PL/SQL
 
Effective iOS Network Programming Techniques
Effective iOS Network Programming TechniquesEffective iOS Network Programming Techniques
Effective iOS Network Programming Techniques
 
[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera
[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera
[Hyperlogy - Tài liệu Workshop] Real time log analytics with cloudera
 
Let us make clear the aws directconnect
Let us make clear the aws directconnectLet us make clear the aws directconnect
Let us make clear the aws directconnect
 
Spark Jobserver
Spark JobserverSpark Jobserver
Spark Jobserver
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
 
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
 
Testing multi outputformat based mapreduce
Testing multi outputformat based mapreduceTesting multi outputformat based mapreduce
Testing multi outputformat based mapreduce
 
Info 2402 assignment 2_ crawler
Info 2402 assignment 2_ crawlerInfo 2402 assignment 2_ crawler
Info 2402 assignment 2_ crawler
 
Node.js 與 google cloud storage
Node.js 與 google cloud storageNode.js 與 google cloud storage
Node.js 與 google cloud storage
 
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
Internet of everything: let's talk about IoT and Azure - DotNet Conf 2018
 
Aurinko
AurinkoAurinko
Aurinko
 

Viewers also liked

JAWS DAYS 2017「IoTとセキュリティ」ワークショップ
JAWS DAYS 2017「IoTとセキュリティ」ワークショップJAWS DAYS 2017「IoTとセキュリティ」ワークショップ
JAWS DAYS 2017「IoTとセキュリティ」ワークショップMotokatsu Matsui
 
エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜
エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜
エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜Mamoru Ohashi
 
AWS Black Belt Online Seminar AWS上のJenkins活用方法
AWS Black Belt Online Seminar AWS上のJenkins活用方法AWS Black Belt Online Seminar AWS上のJenkins活用方法
AWS Black Belt Online Seminar AWS上のJenkins活用方法Amazon Web Services Japan
 
サーバーレスの今とこれから
サーバーレスの今とこれからサーバーレスの今とこれから
サーバーレスの今とこれから真吾 吉田
 
Vyatta meeting 2013 spring
Vyatta meeting 2013 springVyatta meeting 2013 spring
Vyatta meeting 2013 springMotokatsu Matsui
 
将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み
将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み
将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組みSORACOM,INC
 
IoTの規格標準化動向とデバイスWebAPI
IoTの規格標準化動向とデバイスWebAPIIoTの規格標準化動向とデバイスWebAPI
IoTの規格標準化動向とデバイスWebAPIAkira Sasaki
 
ネットワーク概論 サーバの構築理論
ネットワーク概論 サーバの構築理論ネットワーク概論 サーバの構築理論
ネットワーク概論 サーバの構築理論Takahiro Komatsu
 
Hadoop概要説明
Hadoop概要説明Hadoop概要説明
Hadoop概要説明Satoshi Noto
 
分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)
分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)
分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)NTT DATA OSS Professional Services
 
AWSマネージドサービスをフル活用したヘルスケアIoTプラットフォーム
AWSマネージドサービスをフル活用したヘルスケアIoTプラットフォームAWSマネージドサービスをフル活用したヘルスケアIoTプラットフォーム
AWSマネージドサービスをフル活用したヘルスケアIoTプラットフォームHiroki Takeda
 
Aws io tとsoracomを 使ってiotの世界に触れてみる
Aws io tとsoracomを 使ってiotの世界に触れてみるAws io tとsoracomを 使ってiotの世界に触れてみる
Aws io tとsoracomを 使ってiotの世界に触れてみるHideto Masuoka
 
スマートファクトリーを支えるIoTインフラをつくった話
スマートファクトリーを支えるIoTインフラをつくった話スマートファクトリーを支えるIoTインフラをつくった話
スマートファクトリーを支えるIoTインフラをつくった話Keigo Suda
 
AWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorksAWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorksAmazon Web Services Japan
 
AWS Shieldのご紹介 Managed DDoS Protection
AWS Shieldのご紹介 Managed DDoS ProtectionAWS Shieldのご紹介 Managed DDoS Protection
AWS Shieldのご紹介 Managed DDoS ProtectionAmazon Web Services Japan
 
IoTデータ活用のフィードバックループ
IoTデータ活用のフィードバックループIoTデータ活用のフィードバックループ
IoTデータ活用のフィードバックループKoichi Sasaki
 
ユーザーからみたre:Inventのこれまでと今後
ユーザーからみたre:Inventのこれまでと今後ユーザーからみたre:Inventのこれまでと今後
ユーザーからみたre:Inventのこれまでと今後Recruit Technologies
 
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
AWS Black Belt Online Seminar 2017 AWS Storage GatewayAWS Black Belt Online Seminar 2017 AWS Storage Gateway
AWS Black Belt Online Seminar 2017 AWS Storage GatewayAmazon Web Services Japan
 
AWS Black Belt Online Seminar 2017 Amazon EC2 Systems Manager
AWS Black Belt Online Seminar 2017 Amazon EC2 Systems ManagerAWS Black Belt Online Seminar 2017 Amazon EC2 Systems Manager
AWS Black Belt Online Seminar 2017 Amazon EC2 Systems ManagerAmazon Web Services Japan
 
IoT案件を70件やってみて分かった事
IoT案件を70件やってみて分かった事IoT案件を70件やってみて分かった事
IoT案件を70件やってみて分かった事Koichi Sasaki
 

Viewers also liked (20)

JAWS DAYS 2017「IoTとセキュリティ」ワークショップ
JAWS DAYS 2017「IoTとセキュリティ」ワークショップJAWS DAYS 2017「IoTとセキュリティ」ワークショップ
JAWS DAYS 2017「IoTとセキュリティ」ワークショップ
 
エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜
エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜
エンタープライズ企業におけるAWS正式採用への挑戦〜レガシーを微笑みにかえて〜
 
AWS Black Belt Online Seminar AWS上のJenkins活用方法
AWS Black Belt Online Seminar AWS上のJenkins活用方法AWS Black Belt Online Seminar AWS上のJenkins活用方法
AWS Black Belt Online Seminar AWS上のJenkins活用方法
 
サーバーレスの今とこれから
サーバーレスの今とこれからサーバーレスの今とこれから
サーバーレスの今とこれから
 
Vyatta meeting 2013 spring
Vyatta meeting 2013 springVyatta meeting 2013 spring
Vyatta meeting 2013 spring
 
将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み
将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み
将来のネットワークインフラに関する研究会 | 次世代通信サービスに求められる機能とSORACOMの取り組み
 
IoTの規格標準化動向とデバイスWebAPI
IoTの規格標準化動向とデバイスWebAPIIoTの規格標準化動向とデバイスWebAPI
IoTの規格標準化動向とデバイスWebAPI
 
ネットワーク概論 サーバの構築理論
ネットワーク概論 サーバの構築理論ネットワーク概論 サーバの構築理論
ネットワーク概論 サーバの構築理論
 
Hadoop概要説明
Hadoop概要説明Hadoop概要説明
Hadoop概要説明
 
分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)
分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)
分散処理基盤ApacheHadoop入門とHadoopエコシステムの最新技術動向(OSC2015 Kansai発表資料)
 
AWSマネージドサービスをフル活用したヘルスケアIoTプラットフォーム
AWSマネージドサービスをフル活用したヘルスケアIoTプラットフォームAWSマネージドサービスをフル活用したヘルスケアIoTプラットフォーム
AWSマネージドサービスをフル活用したヘルスケアIoTプラットフォーム
 
Aws io tとsoracomを 使ってiotの世界に触れてみる
Aws io tとsoracomを 使ってiotの世界に触れてみるAws io tとsoracomを 使ってiotの世界に触れてみる
Aws io tとsoracomを 使ってiotの世界に触れてみる
 
スマートファクトリーを支えるIoTインフラをつくった話
スマートファクトリーを支えるIoTインフラをつくった話スマートファクトリーを支えるIoTインフラをつくった話
スマートファクトリーを支えるIoTインフラをつくった話
 
AWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorksAWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorks
 
AWS Shieldのご紹介 Managed DDoS Protection
AWS Shieldのご紹介 Managed DDoS ProtectionAWS Shieldのご紹介 Managed DDoS Protection
AWS Shieldのご紹介 Managed DDoS Protection
 
IoTデータ活用のフィードバックループ
IoTデータ活用のフィードバックループIoTデータ活用のフィードバックループ
IoTデータ活用のフィードバックループ
 
ユーザーからみたre:Inventのこれまでと今後
ユーザーからみたre:Inventのこれまでと今後ユーザーからみたre:Inventのこれまでと今後
ユーザーからみたre:Inventのこれまでと今後
 
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
AWS Black Belt Online Seminar 2017 AWS Storage GatewayAWS Black Belt Online Seminar 2017 AWS Storage Gateway
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
 
AWS Black Belt Online Seminar 2017 Amazon EC2 Systems Manager
AWS Black Belt Online Seminar 2017 Amazon EC2 Systems ManagerAWS Black Belt Online Seminar 2017 Amazon EC2 Systems Manager
AWS Black Belt Online Seminar 2017 Amazon EC2 Systems Manager
 
IoT案件を70件やってみて分かった事
IoT案件を70件やってみて分かった事IoT案件を70件やってみて分かった事
IoT案件を70件やってみて分かった事
 

Similar to SORACOM Beam から AWS IoT へのデータ送信

Notes for AWS IoT
Notes for AWS IoTNotes for AWS IoT
Notes for AWS IoT承翰 蔡
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaVito Flavio Lorusso
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisFIWARE
 
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...Amazon Web Services
 
Best Practices of IoT Security in the Cloud
Best Practices of IoT Security in the CloudBest Practices of IoT Security in the Cloud
Best Practices of IoT Security in the CloudAmazon Web Services
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server Masahiro Nagano
 
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...Amazon Web Services
 
Connect Intergration Patterns: A Case Study - Patrick Streule
Connect Intergration Patterns: A Case Study - Patrick StreuleConnect Intergration Patterns: A Case Study - Patrick Streule
Connect Intergration Patterns: A Case Study - Patrick StreuleAtlassian
 
So I DevSecOpsed Office 365
So I DevSecOpsed Office 365So I DevSecOpsed Office 365
So I DevSecOpsed Office 365Alex Mags
 
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능Hyperledger Korea User Group
 
Provisioning in Microsoft Azure
Provisioning in Microsoft AzureProvisioning in Microsoft Azure
Provisioning in Microsoft Azureilagin
 
(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things
(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things
(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using ThingsAmazon Web Services
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfAdrianoSantos888423
 
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API AuthorizationGDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API AuthorizationKAI CHU CHUNG
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverAltitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverFastly
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk OdessaJS Conf
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga
 
Icinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego 2016 - Apify them allIcinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego 2016 - Apify them allIcinga
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with WingsRemy Sharp
 

Similar to SORACOM Beam から AWS IoT へのデータ送信 (20)

Notes for AWS IoT
Notes for AWS IoTNotes for AWS IoT
Notes for AWS IoT
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninja
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEis
 
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
 
Best Practices of IoT Security in the Cloud
Best Practices of IoT Security in the CloudBest Practices of IoT Security in the Cloud
Best Practices of IoT Security in the Cloud
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
 
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
TLS303 How to Deploy Python Applications on AWS Elastic Beanstalk - AWS re:In...
 
Connect Intergration Patterns: A Case Study - Patrick Streule
Connect Intergration Patterns: A Case Study - Patrick StreuleConnect Intergration Patterns: A Case Study - Patrick Streule
Connect Intergration Patterns: A Case Study - Patrick Streule
 
So I DevSecOpsed Office 365
So I DevSecOpsed Office 365So I DevSecOpsed Office 365
So I DevSecOpsed Office 365
 
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
 
Provisioning in Microsoft Azure
Provisioning in Microsoft AzureProvisioning in Microsoft Azure
Provisioning in Microsoft Azure
 
(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things
(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things
(MBL311) NEW! AWS IoT: Securely Building, Provisioning, & Using Things
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdf
 
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API AuthorizationGDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverAltitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them all
 
Icinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego 2016 - Apify them allIcinga Camp San Diego 2016 - Apify them all
Icinga Camp San Diego 2016 - Apify them all
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
 

More from Motokatsu Matsui

Serverless x IoT = "IoT Scale" backend
Serverless x IoT = "IoT Scale" backendServerless x IoT = "IoT Scale" backend
Serverless x IoT = "IoT Scale" backendMotokatsu Matsui
 
IoT で捗る!ダイエット
IoT で捗る!ダイエットIoT で捗る!ダイエット
IoT で捗る!ダイエットMotokatsu Matsui
 
Developers.IO 2016 | 疎結合で非同期なチーム開発
Developers.IO 2016 | 疎結合で非同期なチーム開発Developers.IO 2016 | 疎結合で非同期なチーム開発
Developers.IO 2016 | 疎結合で非同期なチーム開発Motokatsu Matsui
 
Ec2 region migration_guide
Ec2 region migration_guideEc2 region migration_guide
Ec2 region migration_guideMotokatsu Matsui
 

More from Motokatsu Matsui (6)

Serverless x IoT = "IoT Scale" backend
Serverless x IoT = "IoT Scale" backendServerless x IoT = "IoT Scale" backend
Serverless x IoT = "IoT Scale" backend
 
IoT で捗る!ダイエット
IoT で捗る!ダイエットIoT で捗る!ダイエット
IoT で捗る!ダイエット
 
Developers.IO 2016 | 疎結合で非同期なチーム開発
Developers.IO 2016 | 疎結合で非同期なチーム開発Developers.IO 2016 | 疎結合で非同期なチーム開発
Developers.IO 2016 | 疎結合で非同期なチーム開発
 
俺のLambda
俺のLambda俺のLambda
俺のLambda
 
Hairpin dx pattern
Hairpin dx patternHairpin dx pattern
Hairpin dx pattern
 
Ec2 region migration_guide
Ec2 region migration_guideEc2 region migration_guide
Ec2 region migration_guide
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

SORACOM Beam から AWS IoT へのデータ送信

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. # コピペ用コマンド # AWS IoT aws iot create-thing --thing-name raspi2 aws iot create-keys-and-certificate --set-as-active |tee cert.json certificateArn=$(jq -r .certificateArn < cert.json) jq -r .certificatePem < cert.json | tee cert.pem jq -r .keyPair.PrivateKey < cert.json | tee key.pem aws iot create-policy --policy-name "PubSubToAnyTopic" --policy-document '{"Version":"2012-10- 17","Statement":[{"Effect":"Allow","Action":["iot:*"],"Resource":["*"]}]}' aws iot attach-principal-policy --principal $certificateArn --policy-name "PubSubToAnyTopic" aws iot attach-thing-principal --thing-name raspi2 --principal $certificateArn curl -o ca.pem https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification- Authority-G5.pem cat rule.json { "ruleDisabled": false, "sql": "SELECT * FROM 'beam2iot'", "description": "publish message to SNS", "actions": [ { "sns": { "targetArn": "arn:aws:sns:ap-northeast-1:903921708000:beam2iot", "roleArn": "arn:aws:iam::903921708000:role/aws_iot_sns" } } ] } aws iot create-topic-rule --rule-name beam2iot --topic-rule-payload file://rule.json
  • 8. # Beam soracom group create --tags name:AWSIoT | tee group.json group_id=$(jq -r .groupId < group.json) curl -O https://gist.githubusercontent.com/j3tm0t0/ba69a1a6f7af3b976c64/raw/b29a19347c08a7e06bb1c6ff3a20c822c8e1d572/B eam_to_AWSIoT.rb ruby Beam_to_AWSIoT.rb key.pem cert.pem ca.pem $group_id imsi=001010000000000 soracom sim set_group --imsi $imsi --group-id $group_id # on Raspberry Pi cat random.sh #!/bin/bash wait=$1 if [ "$wait" = "" ] then wait=5 fi while [ 1 ] do timestamp=$(date +%s) cat <<EOF {"id":$RANDOM,"timestamp":$timestamp,"a":$RANDOM,"b":$RANDOM,"c":$RANDOM} EOF sleep $wait done ./random.sh | mosquitto_pub -d -h beam.soracom.io -t topic –l # on Mac while [ 1 ] ; do aws sqs receive-message --queue-url https://sqs.ap-northeast-1.amazonaws.com/000000000000/beam2iot --wait-time-seconds 20 | jq -r '.Messages[].Body' | jq -r .Message ; sleep 1 ; done