Real-time Chat Backend on AWS IoT 20160422akitsukada
This document describes building a real-time chat backend using AWS IoT. AWS IoT provides a managed WebSocket that allows building simple, scalable, and extensible client applications. The document demonstrates connecting mobile clients to AWS IoT topics using the IoT SDK, subscribing and publishing messages, and using IoT rules to trigger actions like mobile push notifications based on topic data.
This document summarizes a presentation on accelerated TLS/SSL adoption. It discusses the history and evolution of TLS/SSL, including vulnerabilities addressed over time. It outlines industry trends driving greater encryption enforcement, like search engines prioritizing HTTPS, PCI standards, and vendor policies. Finally, it notes that complete HTTPS adoption provides business benefits like increased marketing, lower costs, better user experience, and greater security and trust.
Real-time Chat Backend on AWS IoT 20160422akitsukada
This document describes building a real-time chat backend using AWS IoT. AWS IoT provides a managed WebSocket that allows building simple, scalable, and extensible client applications. The document demonstrates connecting mobile clients to AWS IoT topics using the IoT SDK, subscribing and publishing messages, and using IoT rules to trigger actions like mobile push notifications based on topic data.
This document summarizes a presentation on accelerated TLS/SSL adoption. It discusses the history and evolution of TLS/SSL, including vulnerabilities addressed over time. It outlines industry trends driving greater encryption enforcement, like search engines prioritizing HTTPS, PCI standards, and vendor policies. Finally, it notes that complete HTTPS adoption provides business benefits like increased marketing, lower costs, better user experience, and greater security and trust.
The document discusses setting up a log server using ELK Stack and Docker. It introduces ELK Stack which combines Elasticsearch, Logstash, and Kibana. Logstash collects logs, Elasticsearch stores and enables search of logs, and Kibana provides dashboards. The document also covers Docker concepts like images and containers, and using Dockerfile to define images. It recommends Docker Hub as a central registry and mentions capabilities like GitHub integration.
This document summarizes a chatting server built on AWS. It describes using DynamoDB with a Python wrapper for data storage. It then discusses testing latency between UCloud and AWS AP-Northeast-1 regions for packet delivery. The live chatting functionality is shown to use EC2 instances, ElastiCache Redis, and load balancing. Logging of messages is implemented with SQS and DynamoDB. Push notifications on new messages uses SNS. An API allows controlling the chat server via commands sent to SQS.
This document compares Apache Kafka and AWS Kinesis for message streaming. It outlines that Kafka is an open source publish-subscribe messaging system designed as a distributed commit log, while Kinesis provides streaming data services. It also notes some key differences like Kafka typically handling over 8000 messages/second while Kinesis can handle under 100 messages/second.
Learn how to build a powerful social messaging app that leverages a range of AWS services. In this demo-heavy workshop, we show how you can build an app using Apple Swift and the AWS Mobile Hub. This is a step-by-step journey where you configure and add components to your architecture, then modify and test your components. In the end, you will have a mobile app with a backend running on AWS.
AWS DevDay San Francisco, June 21, 2016.
Presenter: John Burry, Senior Manager, Solutions Architecture
This document discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
This document discusses Kafka, a distributed messaging system originally created by LinkedIn and now an Apache project. It provides an overview of how Kafka works and how various companies use it, including for log processing (LinkedIn), analytics (Facebook, Twitter, Google), and integrating with other technologies like Hadoop, Zookeeper, HBase and Storm. It also covers Kafka's scalability, performance and architecture.
7. 7
リージョン
US-WEST (N. California)
EU-WEST (Ireland)
ASIA PAC (Tokyo)
ASIA PAC (Singapore)
US-WEST (Oregon)
SOUTH AMERICA (Sao Paulo)
US-EAST (Virginia)
GOV CLOUD
ASIA PAC (Sydney)
シンガポール
シドニー
東京
アイルランド
サンパウロ
北カリフォルニア
オレゴン
バージニア
Gov Cloud フランクフルト
EU-CENTRAL (Frankfurt)
北京
Note: 上記図はコンセプト図です。リージョンやアベイラビリィゾーンは増える可能性があります。
詳細はhttp://aws.amazon.com/jp/about-aws/globalinfrastructure/ をご覧ください
ASIA PAC (Seoul)
ソウル
Beijing
セキュリティは大丈夫?(グローバルインフラ)
8. 8
アベイラビリティゾーン
アベイラビリティ・ゾーンによる可用性
US-WEST (N. California) EU-WEST (Ireland)
ASIA PAC (Tokyo)
ASIA PAC (Singapore)
US-WEST (Oregon)
SOUTH AMERICA (Sao Paulo)
US-EAST (Virginia)
GOV CLOUD
ASIA PAC (Sydney)
EU-CENTRAL (Frankfurt)
Note: 上記図はコンセプト図です。リージョンやアベイラビリィゾーンは増える可能性があります。
詳細はhttp://aws.amazon.com/jp/about-aws/globalinfrastructure/ をご覧ください
ASIA PAC (Seoul)
Beijing
8
9. 9
データセンターレベルの障害対策
EU (Ireland)
Availability
Zone A
Availability
Zone C
Availability
Zone B
Asia Pacific (Tokyo)
Availability
Zone A
Availability
Zone B
US West (Oregon)
Availability
Zone A
Availability
Zone B
US West(Northern California)
Availability
Zone A
Availability
Zone B
Asia Pacific (Singapore)
Availability
Zone A
Availability
Zone B
Asia Pacific (Sidney)
Availability
Zone A
Availability
Zone B
South America (Sao Paulo)
Availability
Zone A
Availability
Zone B
US East (Northern Virginia)
Availability
Zone D
Availability
Zone C
Availability
Zone B
Availability
Zone A
EU (Frankfurt)
Availability
Zone A
Availability
Zone B
Note: 上記図はコンセプト図です。リージョンやアベイラビリィゾーンは増える可能性があります。詳細は
http://aws.amazon.com/jp/about-aws/globalinfrastructure/ をご覧ください
Availability
Zone B
Asia Pacific (Seoul)
Availability
Zone A
Availability
Zone B
Beijing
Availability
Zone A
Availability
Zone B
US Gov Cloud
Availability
Zone A
Availability
Zone B
複数DC設置におけるAWSのポリシー
• 物理的に離れたデータセンター群
• 洪水を考慮
• 地盤が安定している場所
• 無停止電源(UPS)、バックアップ電源、異なる電源供給元
• 冗長化されたTier-1ネットワーク
9
18. 18
AWS上に構築した典型的な3層Webシステム
Web Web Web Web
Private
Segment
(Web)
Public
Segment
Lo
g
Private
Segment
(DB)
Public Subnet (DMZ) Public Subnet (DMZ)
Private Subnet Private Subnet
Private Subnet Private Subnet
NAT NAT
操作ログ
リソース監視
通知
データ暗号化
権限管理
Availability Zone Availability Zone
18
42. 42
複数のサブネットでVPC内をセグメント化
Availability Zone Availability Zone
VPC A - 10.0.0.0/16
10.0.1.0/24 10.0.2.0/24
10.0.3.0/24 10.0.4.0/24
10.0.5.0/24 10.0.6.0/24
作成したVPCの内部に自由にサブ
ネットを作成可能
• アドレスレンジは設定後は変更
不可能
• VPCと同じように、将来の拡張
も考慮して設定する必要あり
42
43. 43
EC2やAWSサービスの配置
Web Web Web Web
Lo
g
NAT NAT
Availability Zone Availability Zone
VPC A - 10.0.0.0/16
10.0.1.0/24 10.0.2.0/24
10.0.3.0/24 10.0.4.0/24
10.0.5.0/24 10.0.6.0/24
ELB
• ロードバランサー
• Internetからのリクエストを
Webサーバーに分散
NATサーバー
• WebサーバーがInternetに出る
際に経由するサーバー
Webサーバー
• ELB配下のWebサーバー
• アクセスリクエストはELBを経
由するため直接Internetからア
クセスできる必要はない
RDS
• DBサービス
• 直接インターネットからはアク
セスされない
43
44. 44
ルーティングによるセグメント化
Web Web Web Web
Lo
g
NAT NAT
Availability Zone Availability Zone
VPC A - 10.0.0.0/16
Destination Target
10.0.0.0/16 local
0.0.0.0 Internet
Gateway
Route Table A
Internet Gateway
Destination Target
10.0.0.0/16 local
Route Table C
Destination Target
10.0.0.0/16 local
0.0.0.0 i-XXXXXX
(NAT)
Route Table B
ルーティングの設定
• トラフィックをコントロールす
るためのルーティングテーブル
をサブネットに追加
• Internet Gatewayにルーティ
ングされるものはPublic
Subnetに
• デフォルトゲートウェイにNAT
を指定することで、Private
SubnetもNAT経由でInternet
にアクセス可能
• インターネットゲートウェイに
よるルーティングにはElastic
IPかPublic IPがインスタンス
につけられている必要がある
Public Subnet (DMZ) Public Subnet (DMZ)
Private Subnet Private Subnet
Private Subnet Private Subnet
44
45. 45
セキュリティグループでサーバーを保護
Web Web Web Web
Private
Segment
(Web)
Public
Segment
Lo
g
Private
Segment
(DB)
Public Subnet (DMZ) Public Subnet (DMZ)
Private Subnet Private Subnet
Private Subnet Private Subnet
NAT NAT
Availability Zone Availability Zone
WebサーバーはELBからの
port80/443のみ接続可能
NATサーバーはWebサーバー
からのみ利用可能
DBにはWebサーバーからの
み接続可能
VPC A - 10.0.0.0/16 Internet Gateway
セキュリティグループ
• インスタントレベルでの操作
• ALLOWルールのみのサポート
• ステートフル
• 各セキュリティグループで最大
50ルールまで
• 必要なトラフィックのみ許可し、
極力どこからでもアクセスでき
るというルールは使わない
45
46. 46
ネットワークACLによるVPC内の制御
Web Web Web Web
Public Subnet (DMZ) Public Subnet (DMZ)
Private Subnet Private Subnet
Private Subnet Private Subnet
NAT NAT
Availability Zone Availability Zone
NACLはオプション的な利用
• サブネットレベルでの適用
• ALLOW および DENY
• ステートレス
• サブネット内の全てのインスタ
ンスに適用
• セカンドラインでの防御として
利用
Publicサブネット
からの直接的なDB
サブネットへのア
クセスの拒否
VPC A - 10.0.0.0/16 Internet Gateway
46
47. 47
ネットワークのセグメンテーションとアクセス制御の例
Web Web Web Web
Private
Segment
(Web)
Public
Segment
Lo
g
Private
Segment
(DB)
Public Subnet (DMZ) Public Subnet (DMZ)
Private Subnet Private Subnet
Private Subnet Private Subnet
NAT NAT
Availability Zone Availability Zone
47
56. 56
強度の強いパスワードポリシーの利用
AWSの管理コンソールにログインするために必要となるIAMユーザーのパスワードには以下のようなパ
スワードポリシーを持たせることが可能です。
• Minimum password length(パスワードの最小文字数)
• Require at least one uppercase letter(大文字英字の要求)
• Require at least one lowercase letter (小文字英字の要求)
• Require at least one number(数字を含めることの要求)
• Require at least one non-alphanumeric character (特殊文字の要求)
• Allow users to change their own password
(ユーザー自身によるパスワード変更の許可)
• Enable password expiration (パスワードの有効期限の設定)
• Password expiration period (in days)
• Prevent password reuse (パスワードの再利用の制限)
• Number of passwords to remember
• Password expiration requires administrator reset
(パスワードが期限切れになった場合管理者によるリセットの有無)
本ポリシーはAWSルートアカウントには適用されないので注意が必要です。
56
90. 90
AWS Configの利用
• AWSリソースのレポジトリ情報を取得し、リソースの設定履歴を監査、リ
ソース構成の変更を通知することができるフルマネージドサービス
• サポートリージョン:
• US West (Oregon), US West (Northern California) , US East (N.Virginia), US
GovCloud, South America (São Paulo), EU (Ireland), EU (Frankfurt), Asia
Pacific (Singapore) ,Asia Pacific (Tokyo), Asia Pacific (Sydney), Asia Pacific
(Seoul), Asia Pacific (Beijing)
• 対象サービス、2016年5月26日時点
• 作成・変更・削除オペレーション情報の取得
Amazon EC2
Instance, ENI...
Amazon EBS
Volumes
AWS CloudTrailAmazon VPC
VPC, Subnet...
Amazon IAM
User, Group, Role...
91. 91
AWSでは他にも様々なサービスのログが取得できます
Service Data Method
CloudTrail API Call Log S3
ELB Access Log S3
S3 Object access S3
Auto Scaling Event Logs CLI, Console, API
CloudFront Access logs, cookies S3
Glacier Retrieval jobs only SNS notifications
Redshift Connections/Event logs/status S3, CLI
RDS Service Events
Database log
CLI, Console, API, SNS
Console, CLI
ElastiCache Events SNS
OpsWorks Chef logs CLI
CloudFormation Event logs/status CLI, Console, API
Elastic Beanstalk Event logs/status CLI, Console, API
Data Pipeline Pipeline events
Task runner log
S3
SES Feedback Notification SNS notifications
SNS Messages sent SNS notifications
EMR Hadoop logs S3, Console, Master Node
91