Advertisement
Advertisement

More Related Content

Slideshows for you(20)

Similar to 서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)(20)

Advertisement

More from Amazon Web Services Korea(20)

Advertisement

서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)

  1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  2. • • • • • •
  3. Unlimited Storage – Memory Unlimited Compute – Logic Cloud offers
  4. Dr. Werner Vogels, Amazon.com CTO re:Invent 2015 Keynote
  5. COMPUTE SERVICE EVENT- DRIVEN
  6. AWS Lambda Application-tier at Scale
  7. 디바이스 SDK 클라이언트 인증 및 연결, 메시지 교환을 위한 개발도구 디바이스 게이트웨이 MQTT 및 HTTP 기반 디바이스 통신 보안 및 인증 고급 인증 및 암호화를 통한 보안 제공 RULES ENGINE 장치메시지를 규칙에 따라 AWS 서비스와 연계 동작 AWS 서비스 - - - - - 서드파티 서비스 DEVICE SHADOW 네트웍 단절에도 응답하는 가상 장치 애플리케이션 AWS IoT API 디바이스 레지스트리 IoT 장치 등록 및 관리
  8. SubscribersPublishers
  9. • •
  10. • • o o o { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["iot:Publish"], "Resource": ["arn:aws:iot:us-east-1::topic/foo"] }, { "Effect": "Allow", "Action": ["iot:Subscribe"], "Resource": ["arn:aws:iot:us-east- 1::topicfilter/foo/bar/*"] }]}
  11. • ü ü • ü ü ü ü SELECT * FROM ‘things/thing-2/color’ WHERE color = ‘red’
  12. { "SELECT *, clientId() as MQTTClientId FROM 'room/ac/+' WHERE temperature > 30", "actions": [ { ”sns": { "roleArn": "arn:aws:iam::123456789012:role/SNSPutRole", "topicArn": "arn:aws:sns:us- east-1:123456789012:TempWarningNotification" } ] }
  13. AWS Lambda 함수 실행 S3 버킷에 객체 저장 DynamoDB 테이블에 데이터 추가/변경 SNS 토픽으로 푸시 메시지 Amazon Kinesis 실시간 스트림 동작 실행 Amazon Kinesis Firehose 전달 AWS IoT에 전달
  14. • • • •
  15. { "state" : { “desired" : { "lights": { "color": "RED" }, "engine" : "ON" }, "reported" : { "lights" : { "color": "GREEN" }, "engine" : "ON" }, "delta" : { "lights" : { "color": "RED" } } }, "version" : 10 } Thing Mobile App Shadow • • • • • •
  16. desired: { “status”: “RUNNING” } shadow/update update/accepted Republish vacuum/shadow/update vacuum/update/delta reported: { “AmbientLightValue”: 55 } Rules Engine Shadow Shadow Select * from $/update/accepted where AmbientLightValue <100
  17. C-SDK (Ideal for embedded OS) JS-SDK (Ideal for Embedded Linux Platforms) Arduino Library (Arduino Yun) Mobile SDK (Android and iOS)
  18. ü ü AWS IoT
  19. DynamoDB 테이블: 전체 센서 데이터 받는 경우 데이터 확인: 모든 센서 데이터를 다 받는 경우
  20. AWS IoT Amazon CloudWatch AWS CloudFormation Amazon DynamoDB Amazon ElastiCache Amazon Aurora IoT shadow Amazon API GatewayAWS Lambda Amazon S3 Amazon Kinesis Amazon SQS Amazon SNS Amazon Quick sight Amazon Elastic Search Amazon Machine Learning Amazon Redshift
  21. Mobile Beacon Amazon echo Window sensorPower Plug Switch Bulb Doorlock Gateway Boiler Siren Camera
  22. Mobile Beacon API Gateway Lambda AWS IoT RDS SNS S3DynamoDB Certification Policy Shadow Rule Engine Alexa Skills Kit – KOLON Home Service Amazon echo
  23. Users Skill Information publishingAmazon Alexa Skill : Home IoT In Mode Alexa Skill Kit Model -intent -utterance PublishingLambda ARN TEST Skill // DEVELOPER CONSOLE Lambda RDS Device Gateway Device Shadow AWS IoT Amazon echo
  24. Users Lambda RDS Device Gateway Device Shadow AWS IoT Beacon SELECT * FROM '$aws/things/p100002201/shadow/update/accepted' WHERE state.reported.detail.beacon_loc > 10 Rule Engine Query Rule Engine
  25. Users Lambda RDS SNS S3 DynamoDB Device Gateway Device Shadow AWS IoT Mobile API Gateway PUT : ThingCtrl PUT : SecurityMode POST : SecurityMode Clear PUT : OutMode PUT : Inmode Restful API Rule Engine Door Sensor
  26. def foo(input): quux = bar(input.baz) internalState.quux = quux mysql_insert(quux) def bar(input): # do work return result Foo Bar • •
  27. def handler(event, context): quux = Lambda.Invoke( 'bar', event['baz']) DynamoDB.PutItem( 'quux', quux) def handler(event, context): # do work return result Foo Bar • •
  28. Monolithic/layered Microservices
  29. • • •
  30. App requests over HTTPS CRUD operations MQTT CRUD operations MQTT
  31. CloudWatch event every 5 minutes Lambda runs for 5 minutes Amazon SQS queue
  32. /register Check cert Robots to register Queue reader Register robot Logging Lifecycle event PermissionsCreate shadow Dead letter queue
  33. Robot certificate + signed timestamp CA certificate Unauthenticated HTTPS Robot certificate Authenticated MQTT
  34. Request topic Presigned URL Symmetric encryption key Robot public key Response topic Presigned URL Object encrypted with symmetric key HTTPS call to presigned URL S3 KMS Robot certificate S3 bucket + symmetric key encrypted with robot public key
  35. Fleet of Sensors OperatorAmazon SNS AWS Lambda AWS IoT AWS Greengrass Core • • • • • Amazon DynamoDB AWS Lambda Amazon Redshift
  36. https://aws.amazon.com/ko/serverless/ https://aws.amazon.com/ko/iot/
  37. http://bit.ly/awskr-feedback
Advertisement