๐Ÿ“/cloudIOT 6

AWS ๊ธฐ๋ฐ˜ ์ฃผ์ฐจ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ (3) ์ฝ”๋“œ

https://sssbin.tistory.com/188 ์„ค์ • ์— ์žˆ๋‹ค. S3 ๋ฒ„ํ‚ท์— ์‚ฌ์ง„์„ ์—…๋กœ๋“œํ•˜๊ณ  carRecog/request ํ† ํ”ฝ์— message๋ฅผ publish 2. index.js (๋žŒ๋‹ค์ฝ”๋“œ) var AWS = require('aws-sdk'); var iotdata = new AWS.IotData({ endpoint: '์—”๋“œํฌ์ธํŠธ', }); var client = new AWS.Rekognition(); var bucket = '๋ฒ„ํ‚ท ์ด๋ฆ„'; exports.handler = async function (event) { var photo_target = event.image + '.jpg'; const params = { Image: { S3Object: { Bucket: bucket, Nam..

๐Ÿ“/cloudIOT 2022.06.16

AWS ๊ธฐ๋ฐ˜ ์ฃผ์ฐจ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ (2) Lambda ์„ค์ •

https://sssbin.tistory.com/187 AWS ๊ธฐ๋ฐ˜ ์ฃผ์ฐจ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ (1) AWS IoT Core mqtt๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ฐ„๋‹จํ•œ AWS ๊ธฐ๋ฐ˜ ์ฃผ์ฐจ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค์–ด๋ณด๊ณ ์ž ํ•œ๋‹ค. camera.js -> ๋ฒˆํ˜ธํŒ ์ด๋ฏธ์ง€๋ฅผ S3์— ์—…๋กœ๋“œํ•˜๊ณ  request ํ† ํ”ฝ์— publish ํ•˜๊ณ  ์ด๋•Œ ๋žŒ๋‹คํ•จ์ˆ˜๊ฐ€ ํ˜ธ์ถœ๋˜์–ด rekognition ์ง„ํ–‰ ํ›„ detect ํ†  sssbin.tistory.com 1. IAM ๊ณ„์ •์—์„œ ์—ญํ•  ๋งŒ๋“ค๊ธฐ 2. ๋žŒ๋‹ค ํ•จ์ˆ˜ ๋งŒ๋“ค๊ธฐ 3. AWS IoT > ๋ฉ”์‹œ์ง€ ๋ผ์šฐํŒ… > ๊ทœ์น™ > ๊ทœ์น™ ์ƒ์„ฑ 4. ๋žŒ๋‹คํ•จ์ˆ˜์— ํŠธ๋ฆฌ๊ฑฐ ์ถ”๊ฐ€ camera.js -> carRecog/request ํ† ํ”ฝ์— publish ํ•˜๋ฉด ๋žŒ๋‹ค์—์„œ ์ด ๋ฉ”์‹œ์ง€๋ฅผ ์ฝ๊ธฐ ์œ„ํ•ด ๊ทœ์น™ ์ฟผ๋ฆฌ๋ฅผ SELECT * FROM 'carRecog..

๐Ÿ“/cloudIOT 2022.06.16

AWS ๊ธฐ๋ฐ˜ ์ฃผ์ฐจ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ (1) AWS IoT Core

mqtt๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ฐ„๋‹จํ•œ AWS ๊ธฐ๋ฐ˜ ์ฃผ์ฐจ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค์–ด๋ณด๊ณ ์ž ํ•œ๋‹ค. camera.js -> ๋ฒˆํ˜ธํŒ ์ด๋ฏธ์ง€๋ฅผ S3์— ์—…๋กœ๋“œํ•˜๊ณ  request ํ† ํ”ฝ์— publish ํ•˜๊ณ  ์ด๋•Œ ๋žŒ๋‹คํ•จ์ˆ˜๊ฐ€ ํ˜ธ์ถœ๋˜์–ด rekognition ์ง„ํ–‰ ํ›„ detect ํ† ํ”ฝ์— publish ํ•˜๋ฉด manage.js -> detect ํ† ํ”ฝ์— subscribe ํ•˜๊ณ  ๋ฐ›์€ ๋ฉ”์‹œ์ง€๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด AWS IoT Core์„ ์ด์šฉํ–ˆ๋‹ค. 1. AWS IoT > ๊ด€๋ฆฌ > ์‚ฌ๋ฌผ > ์‚ฌ๋ฌผ ์ƒ์„ฑ ์ •์ฑ… ์„ค์ •์€ ์ผ๋‹จ ๊ฑด๋„ˆ๋›ฐ๊ณ  ์‚ฌ๋ฌผ ์ƒ์„ฑํ•˜๋ฉด ์ธ์ฆ์„œ ํ‚ค ๋‹ค์šด๋กœ๋“œ ์ฐฝ ๋‚˜์˜ค๋Š”๋ฐ ๋ชจ๋‘ ๋‹ค์šด ๋ฐ›๊ธฐ ์ด๋•Œ ๋ฌด์กฐ๊ฑด ๋‹ค์šด๋ฐ›์•„์•ผ ํ•จ!!!!!!!! โญ๏ธโญ๏ธโญ๏ธ ๋งŒ๋“  ์‚ฌ๋ฌผ ARN ๋ณต์‚ฌ 2. AWS IoT > ๋ณด์•ˆ > ์ •์ฑ… > ์ •์ฑ… ์ƒ์„ฑ ์ •์ฑ… ํšจ๊ณผ์— iot:C..

๐Ÿ“/cloudIOT 2022.06.16

AWS EC2 - MQTT ์ด์šฉํ•˜๊ธฐ

โ˜… MQTT Message Broker ๋งŒ๋“ค๊ธฐ 1. EC2 ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ (์šฐ๋ถ„ํˆฌ๋กœ ํ•จ) ํ›„ ์ ‘์† - ์ธ๋ฐ”์šด๋“œ ๊ทœ์น™ ์ถ”๊ฐ€: ์‚ฌ์šฉ์ž์ง€์ • TCP, TCP, 1883, 0.0.0.0/0 2. mosquitto ์„ค์น˜ $ sudo apt install mosquitto $ sudo apt install mosquitto-clients 3. mosquitto ์‹คํ–‰ $ sudo systemctl start mosquitto $ sudo systemctl enable mosquitto 4. pub & sub $ mosquitto_sub -d -t ํ† ํ”ฝ์ด๋ฆ„ $ mosquitto_pub -d -t ํ† ํ”ฝ์ด๋ฆ„ -m "๋ฉ”์‹œ์ง€" -> ์ฐฝ ๋‘๊ฐœ ๋„์›Œ์„œ ํ•œ์ชฝ์—์„œ sub ๋จผ์ € ํ•˜๊ณ  ๋‹ค๋ฅธ์ชฝ์—์„œ pub โ˜… MQTT ์‚ฌ์šฉํ•ด์„œ File Co..

๐Ÿ“/cloudIOT 2022.05.17

Amazon Rekognition ์ด๋ฏธ์ง€์—์„œ ํ…์ŠคํŠธ ๊ฐ์ง€ (nodejs)

https://docs.aws.amazon.com/ko_kr/rekognition/latest/dg/text-detecting-text-procedure.html ์ด๋ฏธ์ง€์—์„œ ํ…์ŠคํŠธ ๊ฐ์ง€ - Amazon Rekognition ์ด ํŽ˜์ด์ง€์— ์ž‘์—…์ด ํ•„์š”ํ•˜๋‹ค๋Š” ์ ์„ ์•Œ๋ ค ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์‹ค๋ง์‹œ์ผœ ๋“œ๋ ค ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค. ์ž ๊น ์‹œ๊ฐ„์„ ๋‚ด์–ด ์„ค๋ช…์„œ๋ฅผ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๋ง์”€ํ•ด ์ฃผ์‹ญ์‹œ์˜ค. docs.aws.amazon.com 1. AWS์—์„œ IAM ์‚ฌ์šฉ์ž ๋งŒ๋“ค๊ธฐ - AWS ์ž๊ฒฉ ์ฆ๋ช… ์œ ํ˜• ์„ ํƒ: ์•ก์„ธ์Šค ํ‚ค, ์•”ํ˜ธ - ์ฝ˜์†” ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ •ํ•˜๊ธฐ - ์ •์ฑ… ์ถ”๊ฐ€: AdministerAccess, AmazonRekognitionFullAccess, AmazonS3ReadOnlyAccess *** ๋งˆ์ง€๋ง‰์— new_user_..

๐Ÿ“/cloudIOT 2022.05.16

๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด OS ์„ค์น˜ & ๋…ธํŠธ๋ถ ์›๊ฒฉ ์ ‘์†

thanks to. ํ•˜์˜ ๋…ธํŠธ๋ถ ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  ๋‚ด์šฉ์„ ํ•˜์˜ ๋…ธํŠธ๋ถ๊ณผ ํ•จ๊ป˜ ํ•ด์•ผ ํ•จ sd ์นด๋“œ ํฌ๋งท -> ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด ์ด๋ฏธ์ง€ ๊ตฌ์›€ ์‹œํ–‰์ฐฉ์˜ค1. sd์นด๋“œ ๋จนํ†ต,,,, ์ „์— ์“ฐ๋˜ ์‚ฌ๋žŒ๋“ค์ด ๋ง‰ ์ผ๋‚˜๋ด„ ๋‹ค์‹œ ๊ต์ฒดํ•จ ๋ชจ๋ฐ”์ผ ํ•ซ์ŠคํŒŸ ์„ค์ • -> ์•„์ด๋””/๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ •ํ•ด์ฃผ๊ธฐ ssh ํŒŒ์ผ(๋นˆ ํŒŒ์ผ) wpa_supplicant.conf ํŒŒ์ผ(์•„๋ž˜ ๋‚ด์šฉ) ์ถ”๊ฐ€ --------------------------------------------------------------------- country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="wifi ์ด๋ฆ„" psk="๋น„๋ฐ€๋ฒˆํ˜ธ" scan=ssid=1 } ----..

๐Ÿ“/cloudIOT 2022.04.04