SlideShare a Scribd company logo
1 of 76
Download to read offline
re:G
ene
rate

AWSマイスターシリーズ  
AWS  Client-‐‑‒side  SDK

-‐‑‒  Android,  iOS  and  Javascript  -‐‑‒
2014.2.5
ソリューションアーキテクト
安川  健太    今井  雄太

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
!   AWS  SDK  オーバービュー
!   クライアント側SDKの活⽤用法
!   クライアント側SDKにおけるAWS  Credentialsの取り扱い
!   各クライアント側SDKの紹介
•  AWS  SDK  for  Android
•  AWS  SDK  for  iOS
•  AWS  SDK  for  JavaScript  in  the  Browser

!   まとめ

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  オーバービュー

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWSのサービス操作と⾔言えば
AWS  Management  Console

AWSコマンドラインツール
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
これらの裏裏側では・・・
!     各サービスの各操作にAPIが定義されている
!   AWSでは・・・

•  ⼈人間がGUIまたはCUI越しに叩く
•  プログラミングしてそれを⾃自動化・簡易易化・カスタ
マイズ

•  ⼈人間が⼿手でやらなくてはいけない事をプログラミングして⾃自
動化できる、これがSDKで簡単に実現可能

à  AWSの実は最も優れた⼀一⾯面

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDKとは
!   AWSのサービスをプログラムで操作できるSDK
•  さまざまな⾔言語で
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 

AWS  SDK  for  Java
AWS  SDK  for  .Net
AWS  SDK  for  Ruby
AWS  SDK  for  PHP
AWS  SDK  for  Python  (boto)
AWS  SDK  for  node.js
AWS  SDK  for  Android
AWS  SDK  for  iOS
AWS  SDK  for  Javascript  in  Browser
有志の⽅方による実装(ActionScript)も

•  通信は原則HTTPS

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
SDK⼀一般の動作イメージ
起動、停⽌止

REST
AWS  SDK

SOAP

Put,Get

DB起動
バックアップ

認証情報

情報取得

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDKをある観点でざっくり分けると
開発者の環境(サーバやバッチ処理理ワーカーなど)で動かすコードで利利⽤用

Java

nodeJS

.NET

PHP

Python

Ruby

エンドユーザの端末あるいはサービスのクライアント側で動くコードで利利⽤用

Android

iOS

Javascript
in  
Browser

クライアント側SDK

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
クライアント側SDKの活⽤用法

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWSのマネージドサービスを活⽤用した
2-‐‑‒tierのアーキテクチャが組める
!   モバイル端末やブラウザからAWSの各種サービスを呼ぶ
•  AWSのマネージドサービスを組み合わせてバックエンドに
•  しかもプラットフォーム横断で連携!

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
例例1:静的ファイルだけで動的サイト
! DynamoDBやS3などをデータの保存先とするHTML
+JSをS3に置けばWebサーバ無しで動的サイトを構築可
データの
読み書き

HTML+JS

https://s3.amazonaws.com/aws.mattgy.net/dynamodb-‐‑‒d3/index.html
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
例例2:  モバイルアプリ間でメッセージング
!   AWSサービスのみで作るチャットアプリ

•  サーバ側のコーディングなしで掲⽰示板/チャットサービスを提供
DynamoDB
・メッセージの保存
・チャットグループとメッセージの紐紐付
Simple  Notification  Service  (SNS)
・新規メッセージの通知
Simple  Queue  Service  (SQS)
・SNSの通知受け⼝口
Simple  Storage  Service  (S3)
・画像等のデータの保存先・配信元

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
例例2:  モバイルアプリ間でメッセージング
! DynamoDB,  S3を使ってデータ共有

2.  DBクエリ  /  
ファイルリクエスト
DynamoDB
1.  DB書き込み  /  
ファイルアップロード

3.  DB応答  /  
ファイルダウンロード
S3

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
例例2:  モバイルアプリ間でメッセージング
!   SNSとSQSを使ってPub/Sub

SNS:  Simple  Notification  Service
SQS:  Simple  Queue  Service

+
SNS  topic

SQS  queue

2.  Notify
1.  Publish

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
例例2:  モバイルアプリ間でメッセージング
チャットグループへのSubscribe
!   過去メッセージはDynamoDBから取得
!   SQSでキューを作成し、SNSにSubscribe
1.  SQSのキューを作成

チャットグループの
SNSトピック

2.  SNSトピックにSubscribe

4.  SNSトピックにPublish

5.  SQSを通じて通知
クライアントA

0.  メッセージ
⼀一覧取得

クライアントB
3.  新メッセージ書き込み

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
例例2:  モバイルアプリ間でメッセージング
チャットグループへのファイルアップロード
!   S3にファイルをアップロード
!   SNSで通知

チャットグループの
SNSトピック
3.  SNSトピックにPublish

4.  SQSを通じて通知
クライアントA
5.  ファイルダウンロード

2.  メッセージ書き込み
クライアントB
1.  ファイルアップロード

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
その他の例例
⾮非同期バッチ処理理
!   ⾮非同期バッチ処理理要求を直接登録
•  通常のWebアプリ等

Job  queue
Client

Workers

Web  Frontend

•  Android/iOS/Javascript  SDKを使った場合

Job  queue
Workers
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
その他の例例
ログやイベント情報の集計処理理
!   ログやイベント情報を直接登録
•  通常のWebアプリ等

Client

Web  Frontend

ログ・イベント集計

•  Android/iOS/Javascript  SDKを使った場合
ログ・イベント集計

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon  SNSへのデバイストークンの登録も直接可能
Apple  Devices

Google  Devices

ント・
3.  エンドポイ
ユーザ情報登録

2.  エ

ンド
ポイ
ント

Amazon  Kindle  Fire  Devices

エンドポイント
取得

Push通知

Amazon  SNS
Mobile  Push

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
クライアント側SDK活⽤用のメリット
!   アプリの開発に多くのメリット:
• 
• 
• 
• 

バックエンド側の開発コストを最⼩小化
バックエンド側の運⽤用コストを最⼩小化
スケーラビリティの⼼心配なし
⾦金金額⾯面でもローコスト(当社⽐比*)

!   必要に応じてEC2も導⼊入できる安⼼心感

•  後からバックエンド側にロジックを⼊入れてシステムの最適化
*  EC2で同規模のサーバを⽴立立てる場合に⽐比べ

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  CREDENTIALSの取扱い

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
誰のAWSアカウントを使う?
!   AWSのコンソールアプリを作る場合
•  エンドユーザはAWSユーザ

àAWSのアクセスキーとシークレットキーを⼊入⼒力力してもらえばOK

!   AWSの各種サービスを使ったアプリを作る場合
•  AWSの各種サービスはあくまでバックエンド
•  エンドユーザは必ずしもAWSユーザではない

àアプリは開発者のアカウントで認証・認可を受ける必要

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
開発者アカウントを使うとして…
!   アプリに開発者アカウントのアクセスキー等を埋め込ん
だら
•  アクセスキーが広範にばら撒かれることに
•  アクセスキーの不不正利利⽤用を⽌止めるためにキーを無効化したら
à全ユーザへのサービスが停⽌止!!

!   アクセスキーの定期的な更更新で対処するにしても
•  更更新のたびにバージョンアップは⾮非現実的
•  更更新前のアプリからはサービス利利⽤用不不可に

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
セキュアなAWSアクセスを提供するには
!   アプリに認証情報を埋め込むべきではない
!   エンドユーザ/端末ごとに異異なるCredentialsを提供すべ
き
•  ユーザごとに必要最⼩小限の権限を与えるのは重要
•  不不正利利⽤用発覚時に不不正ユーザのみ権限を停⽌止

!   Credentialsは期限が来たら無効化されるべき
•  不不正ユーザの影響も期限付きに

これを実現する仕組みあります!
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Security  Token  Service
!   AWSに対する、⼀一時的な認証情報を作成する仕組み

•  期限付きの認証情報(認証チケット)を発⾏行行
•  Identity  and  Access  Management  (IAM)サービスの機能

!   ユーザーに対して、以下の3つのキーを発⾏行行
§  アクセスID
§  シークレットキー
§  セッショントークン

!   作成した認証情報の有効期限設定が可能

§  デフォルト12時間  最⼩小1時間  最⼤大36時間
§  ただし延⻑⾧長・短縮は出来ない

但し、STS⾃自体は認証の機能を持たないため、認証の仕組みは別途必要

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
認証機構とSTSとを
インテグレーションする際の選択肢
{Facebook,  Google,  
Amazon}  のIDで認証

Yes

Web  Identity  
Federationを利利⽤用可!

Yes

Identity  TVMが選択
肢に

No
独⾃自の認証付き
Token  Vending  
Machine  (TVM)実装
が必要
ユーザごとに異異なる権限を
与える必要あり

No
Anonymous  TVMが選択肢に

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Web Identity Federation
!   Web Identity Providerの認証結果を受けてAWSの各種
サービスへのアクセスを認可する仕組み
!   IAM RoleのAssume機能を利用して実現
•  Web Identity Providerによって認証されたユーザは特定のIAM Role
を持つものと見なす(Assume)する

!   対応Identity Providerは
•  Facebook
•  Google
•  Amazon

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Web  Identity  Federationの動作フロー

STS⾃自体が認証済みユーザに
アクセストークンを発⾏行行する
Token  Vending  Machine  
(TVM)の役割を担っている
詳細はマイスターシリーズIAM回を参照:  

http://www.slideshare.net/AmazonWebServicesJapan/20130716-‐‑‒aws-‐‑‒meisterregenerateiampublic
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Web  Identity  Federation利利⽤用時のコード例例
!   Android
WebIdentityFederationSessionCredentialsProvider  wif  =
                  new  WebIdentityFederationSessionCredentialsProvider(fbSession.getAccessToken(),
                                                                                                                          "graph.facebook.com",
                                                                                                                          ROLE_̲ARN);
String  subjectFromWIF  =  wif.getSubjectFromWIF();  
s3  =  new  AmazonS3Client(wif);

!

iOS
AmazonWIFCredentialsProvider  *wif  =  [[AmazonWIFCredentialsProvider  alloc]
initWithRole:ROLE_̲ARN
andWebIdentityToken:self.session.accessTokenData.accessToken
                                                                fromProvider:@"graph.facebook.com"];
NSString  *subjectFromWIF  =  wif.subjectFromWIF;
s3  =  [[[AmazonS3Client  alloc]  autorelease]  initWithCredentialsProvider:wif];

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
独⾃自の認証機構を⽤用いる場合
Token  Vending  Machine  (TVM)を導⼊入

•  ユーザ/端末の認証とトークンの発⾏行行を実施
•  アプリケーションごとの認証とSTSを結びつけるための仕組み

1.  Security  Token  Serviceか
ら認証トークンを取得
1  STSから
2.  クライアントに認証トーク
ンを提供
3.  クライアントは認証トーク
ンを⽤用いてAWSにアクセス

3
アプリの認証
機構に合わせて
任意の実装

1

2

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
TVMの実装⽅方針を⼤大別すると
! AnonymousTVM

•  ユーザ認証を必要とせず、⼀一時認証トークンの機能のみ利利⽤用し
たいユースケース向け
•  例例:誰でも参加出来る掲⽰示板システム、ログの記録

! IdentityTVM

•  ユーザ認証を実施し、認証されたユーザにのみ認証トークンを
発⾏行行するユースケース向け
•  例例:ユーザ認証を伴うソーシャルアプリ、ゲーム等
どちらもサンプルの実装がサーバ側・クライアント側とも公開されている

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Anonymous  TVM
!   デバイス固有のIDと対応する秘密鍵をTVMに登録
!   秘密鍵を使って認証トークンを暗号化して提供

デバイス固有のID
と秘密鍵を登録

秘密鍵を使って

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Identity  TVM
!
!
!
!

 
 
 
 

Facebook,  Twitter,
Out-‐‑‒of-‐‑‒bandでユーザ登録
LDAPやAD等の基幹システ
ムによる認証で置き換え可
登録したユーザ情報でログイン処理理
TVM⽤用秘密鍵の共有
秘密鍵を使って認証トークンを暗号化して提供

Anonymousの場合と同
様

ユーザのパスワー
ドで暗号化

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Web  Identityを⽤用いた
Fine  Grained  Access  Control
!   例例1:  S3バケット内にユーザごとのプライベートな領領域
を作成
{  "Version":"2012-‐‑‒10-‐‑‒17",  
    "Statement":[  
    {  "Effect":"Allow",
        "Action":["s3:GetObject",  "s3:PutObject",  "s3:DeleteObject"],  
        "Resource":[
                "arn:aws:s3:::myBucket/myApp/${graph.facebook.com:id}",  
                "arn:aws:s3:::myBucket/myApp/${graph.facebook.com:id}/*“
          ]
    }  ]
Facebookにログインした
}
ユーザーのIDが⼊入る

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Web  Identityを⽤用いた
Fine  Grained  Access  Control
!   例例2:  DynamoDBのテーブル内にユーザごとにプライ
ベートな⾏行行/列列を定義する
  "Condition":  {
                "ForAllValues:StringEquals":  {
                    "dynamodb:LeadingKeys":  [
                        "${www.amazon.com:user_̲id}"
                    ],
                    "dynamodb:Attributes":  [
                        "UserId”,"GameTitle”,  "Wins”,  "Losses”
                    ]
                },
                "StringEqualsIfExists":  {
                    "dynamodb:Select":  "SPECIFIC_̲ATTRIBUTES"
                }
            }

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
各クライアント側SDKの紹介

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  FOR  ANDROID

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  for  Androidとは
!   Amazon提供のAWS開発⽤用のAndroid向けSDK
!   公式ページ:http://aws.amazon.com/jp/sdkforandroid/
!   環境:Android  2.3  (API  level  10)以上
!   利利⽤用⽅方法

•  公式ページからダウンロード
•  Gitレポジトリから

Mavenをお使いの場合:
公式MavenレポジトリLocalレポジトリにインストー
ルしての利利⽤用は可(但し、正式サポートの範囲外)

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
操作可能サービス
EC2

S3

DynamoDB

SimpleDB

SNS

SQS

SES

ELB

CloudWatch

Autoscaling
※サポートするサービスの範囲はiOS  SDKと同様

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
SDKに含まれるもの
!   AWS  Android  ライブラリ

•  各種サービス向けAPIを提供するJavaライブラリ
•  Androidアプリのプロジェクトから参照
•  最終的にはAPKに内包

!   ソースコード
!   ドキュメント
(コードサンプルはGitレポジトリに移動)
https://github.com/awslabs/aws-‐‑‒sdk-‐‑‒android-‐‑‒samples
• 
• 
• 
• 
• 
• 

各種サービスの操作
SNSとSQSを使ったメッセージボード
S3アップローダ
SimpleDB  ハイスコア
SESフィードバックフォーム
DynamoDBを使ったユーザプリファレンス

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
初期設定
!   プロジェクトの依存関係にAndroid  SDKを追加
•  EclipseとAndroid  SDKを使っている場合の例例:

必要なライブラリをプロジェ
クトのlibs配下にコピー
注:他の場所に配置する場合は最終的なAPKにクラスファ
イルが含まれるようにすること

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
依存するJarファイルについてTips
!   開発時はデバッグシンボル付きのライブラリを使⽤用
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒debug.jar
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒ddb-‐‑‒mapper-‐‑‒debug.jar

!   配布時は必要なサービスのみ同梱
全部⼊入り

aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>.jar
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒ddb-‐‑‒mapper.jar

DynamoDBMapper
を使う場合に必要

必要なサービスのみ

aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒core.jar
        
+
      
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒ddb.jar
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒s3.jar
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒sns.jar
aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒sqs.jar

あるいはproguardを使って必要なパッケージのみ同梱

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例
!   基本的な流流れ(iOSも同様)
• 
• 
• 
• 

利利⽤用するサービスのクライアントオブジェクトの作成
サービスのリクエストオブジェクトを作成
クライアントオブジェクトを通じてリクエスト
レスポンスを受け取る

S3にファイルをアップロードする例例
void  uploadToS3  (String  bucketName,  String  objectName,  File  file){
      AmazonCredentials  credentials  =  
new  BasicAmazonCredentials(ACCESS_̲KEY,  SECRET_̲KEY);
      AmazonS3Client  s3  =  new  AmazonS3Client(credentials);
      PutObjectRequest  req  =  new  PutObjectRequest(bucketName,  objectName,  file));
      PutObjectResponse  resp  =  s3.putObject(req);
}

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:S3へのアップロード  (⾮非同期)
S3UploadTask  uploadTask  =  new  S3UploadTask();
uploadTask.execute(new  PutObjectRequest(bucketName,  objectName,  tempFile));
private  class  S3UploadTask  extends  AsyncTask<PutObjectRequest,  Long,  Long>  
implements  ProgressListener  {
protected  Long  totalSent;

バック
グラウ
ンド実
⾏行行

//  AsyncTask#doInBackground()
protected  Long  doInBackground  (PutObjectRequest...  reqs)  {

totalSent  =  0L;

reqs[0].setProgressListener(this);
S3.getInstance().putObject(reqs[0]);
return  totalSent;
}

  //  ProgressListener#progressChanged()
進⾏行行状 public  void  progressChanged  (ProgressEvent  progressEvent)  { totalSent  
+=  progressEvent.getBytesTransfered();
publishProgress(totalSent);
況の更更
}
新
}
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:DynamoDBへのQuery
ハッシュキーとレンジキーのMaxを指定して特定のテーブルにクエリを送る例
QueryResult doQuery (String hashKey, String max) {
ハッシュ
キーを AttributeValue hashKey = new AttributeValue().withS(hashKey);
指定
Condition lessThanMax = new Condition()
.withComparisonOperator(ComparisonOperator.LT)
条件を
.withAttributeValueList(new AttributeValue().withN(max));
指定
QueryResult result = dynamoClient.query(new QueryRequest()
.withTableName(TABLE_NAME)
クエリを
.withLimit(NUMBER_OF_ITEMS_TO_GET_AT_ONCE)
実行
.withHashKeyValue(hashKey)
.withRangeKeyCondition(lessThanMax)
);
return result;
}

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:DynamoDBMapperで
DynamoDBにオブジェクトを永続化

POJOを定義

@DynamoDBTable(tableName = “meisters_items”)
public class MeistersItem {
private String id;
private long value;
@DynamoDBHashKey(attributeName = “id”)
public String getId() {
return id;
}
@DynamoDBHashKey(attributeName = “id”)
public void setId(String id) {
this.id = id;
}
@DynamoDBAttribute(attributeName = “value”)
public long getValue() {
return time;
}

}

DynamoDBMapperを初期化

AmazonDynamoDBClient dynamoClient =
new AmazonDynamoDBClient(getCredentials());
AmazonDynamoDBMapper dbMapper =
new DynamoDBMapper(getDynamoClient());

POJOの保存
MeisterItem item = new MeisterItem();
item.setId(“Expensive item”);
item.setValue(10000);
dbMapper.save(item);

POJOの読み込み
MeisterItem item = dbMapper.load(MeisterItem.class,
“Expensive item”);

@DynamoDBAttribute(attributeName = “value”)
public void setValue(long time) {
this.time = time;
}
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Android  SDK利利⽤用時のTips
!   UIスレッドからAWSのAPIを呼ぶのは避ける
•  適宜AsyncTaskや別Threadを使⽤用

!   各サービスクライアントのインスタンスは再利利⽤用

•  サービスクライアントの実装はThread  Safe
•  Singletonにすることで重いオブジェクト⽣生成を最⼩小限に
•  例例:サンプル内のAmazonClientManager
public  class  AmazonClientManager  {  //  下記コードは簡易易版
        private  AmazonS3Client  s3Client  =  null;

        public  AmazonS3Client  s3()  {
                if  (s3Client  ==  null)  s3Client  =  new  AmazonS3Client(  credentials  );
                return  s3Client;
        }
  }

!   ユースケース別の解説付きコードサンプルがこちらに:
•  http://aws.amazon.com/articles/SDKs/Android

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  FOR  IOS

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  for  iOSとは
!   Amazon提供のAWS開発⽤用iOS  SDK
!   公式ページ:
http://aws.amazon.com/jp/sdkforios/
!   動作環境:iOS  4.3以上  
!   開発環境:Xcode  v4以上
!   利利⽤用⽅方法

•  公式ページからダウンロード
•  Gitレポジトリから

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
操作可能サービス
EC2

S3

DynamoDB

SimpleDB

SNS

SQS

SES

ELB

CloudWatch

Autoscaling
※サポートするサービスの範囲はAndroid  SDKと同様

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
SDKに含まれるもの
!   AWS  iOSライブラリ

•  各種サービス向けAPIを提供するObjective-‐‑‒Cライブラリ
•  iOSアプリプロジェクトのフレームワークの1つとして参照

!   ドキュメント
!   ソースコード
(コードサンプルはGitレポジトリに移動)
https://github.com/awslabs/aws-‐‑‒sdk-‐‑‒ios-‐‑‒samples
• 
• 
• 
• 
• 
• 
• 

各種サービスの操作
SNSとSQSを使ったメッセージボード
S3アップローダ
SimpleDB  ハイスコア
SESフィードバックフォーム
DynamoDBを使ったユーザプリファレンス
DynamoDB  を  CoreDataフレームワークのバックエンドに

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
初期設定  

〜~Frameworkの追加〜~
!   プロジェクトにSDKを追加

1.  Xcodeにてプロジェクトを開く
2.  Frameworks  GroupをCtrlを押しながら
クリック
3.  AWSiOSSDK.frameworkを追加
• 

AWSPersistence.frameworkは任意
(DynamoDB  +  CoreDataを使った
Persistenceを利利⽤用する場合)

4.  ソースコードで必要なヘッダファイルを
インクルード
•  例例

#import  <AWSiOSSDK/S3/AmazonS3Client.h>
#import  <AWSiOSSDK/SimpleDB/AmazonSimpleDBClient.h>
#import  <AWSiOSSDK/SQS/AmazonSQSClient.h>
#import  <AWSiOSSDK/SNS/AmazonSNSClient.h>

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
初期設定  

〜~ドキュメントのインストール〜~
!   ドキュメントセットをXcodeにインストール
• 

SDKのディレクトリからdocsetファイルをコピー

• 

これを  

– 

• 

Documentation/com.amazon.aws.ios.docset

ここに  
– 

$HOME/Library/Developer/Shared/Documentaion/DocSets

$  mkdir  –p  $HOME/Library/Developer/Shared/Documentaion/DocSets
$  cp  Documentation/com.amazon.aws.ios.docset  
$HOME/Library/Developer/Shared/Documentaion/DocSets

• 

Xcodeを再起動

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例
!   基本的な流流れ  (Androidも同様)
• 
• 
• 
• 

利利⽤用するサービスのクライアントオブジェクトの作成
サービスのリクエストオブジェクトを作成
クライアントオブジェクトを通じてリクエスト
レスポンスを受け取る

S3にファイルをアップロードする例例
-‐‑‒  void  uploadToS3:  (NSString*)  bucketName  keyName:  (NSString  *)  keyName  fileName:  
(NSString  *)  fileName  {
      S3PutObjectRequest  *putObjectRequest  =  
              [[[S3PutObjectRequest  alloc]  initWithKey:keyName  inBucket:bucketName]  autorelease];
        putObjectRequest.filename  =  fileName;
        [[AmazonClientManager  s3]  putObject:putObjectRequest];
}

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:S3へのアップロード(⾮非同期)
1/2  

NSOperationのサブクラスとしてS3 Uploaderを実装
#import <Foundation/Foundation.h>
#import <AWSiOSSDK/AmazonServiceRequest.h>

@interface AsyncImageUploader:NSOperation<AmazonServiceRequestDelegate>
{
…
- (void) start {
….
// Puts the file as an object in the bucket.
S3PutObjectRequest *putObjectRequest =
[[[S3PutObjectRequest alloc] initWithKey:keyName inBucket:bucketName] autorelease];
putObjectRequest.filename = filename;
Delegateとして途中経過や結果を受け
putObjectRequest.delegate = self;

取れるように登録

[[AmazonClientManager s3] putObject:putObjectRequest];
}

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:S3へのアップロード(⾮非同期)
2/2  

Delegateパターンで途中経過や結果を受け取り

完了時
の処理

-(void) request:(AmazonServiceRequest *)request
didCompleteWithResponse:(AmazonServiceResponse *)response
{
[self performSelectorOnMainThread:@selector(hideProgressView)
withObject:nil waitUntilDone:NO];
[self finish];
}

進行状
況の更
新処理

-(void) request:(AmazonServiceRequest *)request
didSendData:(NSInteger)bytesWritten
totalBytesWritten:(NSInteger) totalBytesWritten
totalBytesExpectedToWrite:(NSInteger) totalBytesExpectedToWrite
{
[self performSelectorOnMainThread:@selector(updateProgressView:)
withObject:
[NSNumber numberWithFloat:
 (float)totalBytesWritten / totalBytesExpectedToWrite] waitUntilDone:NO];
}

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:DynamoDBへのQuery
-(DynamoDynamoDBQueryResponse *) doQuery: (NSString*) hashKey
max: (NSString *) max {
DynamoDBQueryRequest *req = [[DynamoDBQueryRequest alloc] autorelease];
req.tableName = TABLE_NAME;
ハッシュ req.limit = [[NSNumber alloc] initWithInt: NUMBER_OF_ITEMS_TO_GET_AT_ONCE];
キーを req.hashKeyValue = [[DynamoDBAttributeValue alloc] initWithS: hashKey] autorelease];

指定

DynamoDBCondition *lessThanMax = [[DynamoDBCondition alloc] autorelease];
[req.rangeKeyCondition setComparisonOperator: @“LT"];
[req.rangeKeyCondition addAttributeValueList:
[[[DynamoDBAttributeValue alloc] initWithN: max] autorelease]];
req.rangeKeyCondition = lessThanMax;

条件を
指定

クエリを
DynamoDBQueryResponse *resp = [[AmazonClientManager dynamodb] query: req];
実行
return resp;

}

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
iOS  SDK利利⽤用時のTips
!   UIスレッドからAWSのAPIを呼ぶのは避ける
•  適宜NSOperationやGCD等を使⽤用

!   各サービスクライアントのインスタンスは再利利⽤用
•  サービスクライアントの実装はThread  Safe
•  例例:サンプル内のAmazonClientManager
#import  "AmazonClientManager.h"
static  AmazonS3Client              *s3    =  nil;
@implementation  AmazonClientManager
+(AmazonS3Client  *)s3
{
        if(s3  ==  nil)  s3    =  [[AmazonS3Client  alloc]  initWithCredentials:credentials];
        return  s3;
}

!   ユースケース別の解説付きコードサンプルがこちらに:
•  http://aws.amazon.com/articles/SDKs/iOS

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  FOR  JAVASCRIPT  
IN  WEB  BROWSER
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS  SDK  for  JavaScript  in  the  
Browserとは
!   Amazon提供のブラウザで動作するJavaScript環境
のためのAWS  SDK
•  node.js環境のためのSDKは別に存在する

!   公式ページ:http://aws.amazon.com/jp/sdkforbrowser/
!   環境:

!   利利⽤用⽅方法

•  公式ページからダウンロード
•  Gitレポジトリから

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
操作可能サービス
DynamoDB

S3

SQS

SNS

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
初期設定(1/2)
!   HTML内にJavaScriptを読み込む

•  SDKをインターネット上の任意の場所に配置し、Scriptタグで
読み込む
•  <script  type="text/javascript"  src=”PATH/TO/YOUR/
SDK"></script>

•  AWSで⽤用意するCDN上に配置されたSDKを使う

•  <script  type="text/javascript"  src="https://
sdk.amazonaws.com/js/aws-‐‑‒sdk-‐‑‒2.0.0-‐‑‒rc1.min.js"></
script>

!   読み込まれると、“AWS”というグローバル変数が利利⽤用可
能になる

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
初期設定(2/2)
! WebIdentityFederationでAWS  Credentialを取得
//  FacebookのAccessTokenを使ってAWSのCredentialを取得する
window.fbAsyncInit  =  function()  {
                FB.init({  appId:  appId  });
                FB.login(function(response)  {
                    AWS.config.credentials  =  new  AWS.WebIdentityCredentials({
                        ProviderId:  'graph.facebook.com',
                        RoleArn:  roleArn,        //  IAM  RoleのARN
                        WebIdentityToken:  response.authResponse.accessToken
                    });
                    fbUserId  =  response.authResponse.userID;
                    button.style.display  =  'block';
                });
};
//  FacebookのSDK読み込み
(function(d,  s,  id){
        var  js,  fjs  =  d.getElementsByTagName(s)[0];
        if  (d.getElementById(id))  {return;}
        js  =  d.createElement(s);  js.id  =  id;
        js.src  =  "//connect.facebook.net/en_̲US/all.js";
        fjs.parentNode.insertBefore(js,  fjs);
}(document,  'script',  'facebook-‐‑‒jssdk')); be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not
コード例例:S3へのアップロード
<input  type="file"  id="file-‐‑‒chooser"  />
<button  id="upload-‐‑‒button"  style="display:  none”>Upload  to  S3</button>
<script  type="text/javascript”>
//AWS.config.credentialにCredentialが取得済みの状態で
var  bucket  =  new  AWS.S3({params:  {Bucket:  “YOUR_̲BUCKET_̲NAME”}});
button.addEventListener('click',  function()  {
                var  file  =  fileChooser.files[0];
                if  (file)  {
                    results.innerHTML  =  '';
                    var  objKey  =  “KEY_̲NAME”;
                    var  params  =  {Key:  objKey,  Body:  file,  ACL:  'public-‐‑‒read'};
                    bucket.putObject(params,  function  (err,  data)  {
                        if  (err)  {
                            console.log(err);
                        }  else  {
                            console.log(data);
                        }
                    });
              }
},  false);
</script>

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
コード例例:DynamoDBへのputItem
<button  id="upload-‐‑‒button"  style="display:  none">Put  to  DynamoDB</button>
<script  type="text/javascript”>
//AWS.config.credentialにCredentialが取得済みの状態で
var  dynamodb  =  new  AWS.DynamoDB({region:'ap-‐‑‒northeast-‐‑‒1'});
button.addEventListener('click',  function()  {
          var  params  =  {
                      TableName:  'test',
                                Item:  {
                                        'title':  {S:  appId  +  'aaa'},
                                        'message':  {S:  'Good  Morning'}
                    }
          };
        dynamodb.putItem(params,  function(err,  data)  {
                    if  (err)  {
                                        console.log(err);
                    }else{
                                        console.log(data);
                    }
          });
},  false);
</script>
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
まとめ

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
まとめ
!   クライアント側SDKを⽤用いて2-‐‑‒tierアーキテクチャを実現
• 
• 
• 
• 

バックエンド側の開発コストを最⼩小化
バックエンド側の運⽤用コストを最⼩小化
スケーラビリティの⼼心配なし
⾦金金額⾯面でもコスト削減に

!   Web  Identity  Federationや認証トークン機構を使うことで
クライアントアプリからのAWSへのアクセスも安⼼心
!   AWSはコーディングする⽅方の⼒力力を最⼤大限に引き出すインフラ
•  その恩恵はサーバ側だけでなくクライアントアプリにも!

•  HAPPY  CODING!!
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
ご参加ありがとう
ございました

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
TVM導⼊入の流流れ
!   認証トークンに割り当てるユーザ権限を設定

•  Identity  and  Access  Management  (IAM)でユーザを作成
•  アプリケーションに合わせたポリシーを割り当て

!   TVMを実装し、デプロイ

•  サンプルはWARファイルをデプロイするだけで実⾏行行可
•  AnonymousTVM
•  IdentityTVM

àElasticBeanstalkを使うと簡単!

!   TVMの各種設定

•  Security  Token  Serviceにアクセスするためのアクセスキー設定
•  SSLの設定(推奨)

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
認証トークンに割り当てるユーザ権限を設定
(1/2)
!   IAMでTVM⽤用の新しいユーザを作成(例例:TVMUser)

!   認証情報(アクセスキー・シークレットキー)を保存

後でTVMアプリケーション側に設定するので大切に保存
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
認証トークンに割り当てるユーザ権限を設定
(2/2)
!   カスタムポリシーを作成して割り当て

!   カスタムポリシーの例例  (TVMのサンプルに同梱)

{ "Statement": [
{ "Effect": "Allow", "Action": "sts:GetFederationToken", "Resource": "*" },
{ "Effect": "Allow", "Action": "iam:GetUser", "Resource": "*" },
{ "Effect": "Allow", "Action": "sdb:*", "Resource": "*" },
{ "Effect":"Allow", "Action":"dynamodb:*", "Resource":"*" },
{ "Effect": "Allow", "Action": "sqs:*", "Resource": "*" },
{ "Effect": "Allow", "Action": "s3:*", "Resource": "*" },
{"Effect": "Allow", "Action": "sns:*", "Resource": "*" }
]
}

アプリケーションで必要最小限な権限になるよう更新

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
TVMがデプロイされたことを確認
!   TVMをデプロイしたHTTPコンテナにアクセス

設定に関する警告が消え
て、Security Token
Serviceにアクセス出来る
ようになったことを確認

本番ではSSL必須:
平文ではデバイス/ユーザ
登録で秘密鍵/パスワード
が流出するリスク

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
[再掲]  
認証トークンを⽤用いたサービス利利⽤用の流流れ

Token Vending Machine (TVM)を導入

•  ユーザ/端末の認証とトークンの発行を実施
•  アプリケーションごとの認証とAWSの認証機構を結びつけるサービス

1.  Security Token Serviceか
1ら認証トークンを取得
STSから
2.  クライアントに認証トークン
を提供
3.  クライアントは認証トークン
を用いてAWSにアクセス

3
TVMのサンプル
を利用
1
2

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
TVMを⽤用いたサンプルを試す
AnonymousTVMの動作確認
!   samples/S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVM
•  設定例例:

•  TVM  URL:  http://anon-‐‑‒example.elasticbeanstalk.com

Android: AwsCredentials.propertiesを編集
tokenVendingMachineURL=anon-example.elasticbeanstalk.com
iOS: Constants.hを編集
#define TOKEN_VENDING_MACHINE_URL @“anon-example.elasticbeanstalk.com”
/registerdevice?uid=<UID>&key=<KEY>

/gettoken?
uid=<UID>&timestamp=<timestamp>&signature=<Sig http://anonexample.elasticbeanstalk.com
nature>
<Encrypted token credentials>
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
TVMを⽤用いたサンプルを試す
IdentityTVMの動作確認
!   samples/S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVMIdentity
•  設定例例:

•  TVM  URL:  http://id-‐‑‒example.elasticbeanstalk.com
•  アプリ名:  exampleApp  (TVMの環境変数”PARAM1”に設定した値)
Android: AwsCredentials.propertiesを編集
tokenVendingMachineURL=id-example.elasticbeanstalk.com
appName=exampleApp
iOS: Constants.hを編集
#define TOKEN_VENDING_MACHINE_URL @“id-example.elasticbeanstalk.com”
#define APP_NAME @“exampleApp"

login()
registeruser()
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
TVM  Clientのインテグレーション
!   Android  /  iOSともにTVM  Clientの実装がサンプルに

•  各サンプル内のAmazonClientManagerの実装はTVM  Clientを利利⽤用
•  S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVM    à  Anonymous  TVM
•  S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVMIdentity    à  IdentityTVM

!   おすすめのステップは…

1.  ベースとするTVMの実装を決定  (Anonymous  or  Identity)
2.  対応するサンプルコード内の実装をコピー
• 
• 

AmazonClientManager
TVMClient

3.  必要に応じてTVM,  TVM  Client,  認証メカニズムをカスタマイズ
• 

Identity  TVMをカスタマイズすればSNSとのID連携も

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

More Related Content

What's hot

Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法についてYuji Otani
 
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜Amazon Web Services Japan
 
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)NTT DATA Technology & Innovation
 
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05都元ダイスケ Miyamoto
 
おひとりさまAWS Organizationsのススメ
おひとりさまAWS OrganizationsのススメおひとりさまAWS Organizationsのススメ
おひとりさまAWS OrganizationsのススメMakio Tsukamoto
 
初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!Tetsutaro Watanabe
 
インフラエンジニアってなんでしたっけ(仮)
インフラエンジニアってなんでしたっけ(仮)インフラエンジニアってなんでしたっけ(仮)
インフラエンジニアってなんでしたっけ(仮)Akihiro Kuwano
 
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQLAmazon Web Services Japan
 
AWS で Presto を徹底的に使いこなすワザ
AWS で Presto を徹底的に使いこなすワザAWS で Presto を徹底的に使いこなすワザ
AWS で Presto を徹底的に使いこなすワザNoritaka Sekiyama
 
The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発Amazon Web Services Japan
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティスAmazon Web Services Japan
 
AWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティスAWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティスAkihiro Kuwano
 
AWS LambdaとDynamoDBがこんなにツライはずがない #ssmjp
AWS LambdaとDynamoDBがこんなにツライはずがない #ssmjpAWS LambdaとDynamoDBがこんなにツライはずがない #ssmjp
AWS LambdaとDynamoDBがこんなにツライはずがない #ssmjpMasahiro NAKAYAMA
 
その ionice、ほんとに効いてますか?
その ionice、ほんとに効いてますか?その ionice、ほんとに効いてますか?
その ionice、ほんとに効いてますか?Narimichi Takamura
 
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤Amazon Web Services Japan
 
20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編
20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編
20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編Tatsuya (達也) Katsuhara (勝原)
 
リクルートのWebサービスを支える「RAFTEL」
リクルートのWebサービスを支える「RAFTEL」リクルートのWebサービスを支える「RAFTEL」
リクルートのWebサービスを支える「RAFTEL」Recruit Technologies
 
SageMakerでもAUTOMATIC1111したい
SageMakerでもAUTOMATIC1111したいSageMakerでもAUTOMATIC1111したい
SageMakerでもAUTOMATIC1111したい真吾 吉田
 

What's hot (20)

Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法について
 
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
 
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
 
AWS BlackBelt AWS上でのDDoS対策
AWS BlackBelt AWS上でのDDoS対策AWS BlackBelt AWS上でのDDoS対策
AWS BlackBelt AWS上でのDDoS対策
 
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
 
おひとりさまAWS Organizationsのススメ
おひとりさまAWS OrganizationsのススメおひとりさまAWS Organizationsのススメ
おひとりさまAWS Organizationsのススメ
 
初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!
 
インフラエンジニアってなんでしたっけ(仮)
インフラエンジニアってなんでしたっけ(仮)インフラエンジニアってなんでしたっけ(仮)
インフラエンジニアってなんでしたっけ(仮)
 
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
 
AWS で Presto を徹底的に使いこなすワザ
AWS で Presto を徹底的に使いこなすワザAWS で Presto を徹底的に使いこなすワザ
AWS で Presto を徹底的に使いこなすワザ
 
The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
 
AWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティスAWSのログ管理ベストプラクティス
AWSのログ管理ベストプラクティス
 
AWS LambdaとDynamoDBがこんなにツライはずがない #ssmjp
AWS LambdaとDynamoDBがこんなにツライはずがない #ssmjpAWS LambdaとDynamoDBがこんなにツライはずがない #ssmjp
AWS LambdaとDynamoDBがこんなにツライはずがない #ssmjp
 
その ionice、ほんとに効いてますか?
その ionice、ほんとに効いてますか?その ionice、ほんとに効いてますか?
その ionice、ほんとに効いてますか?
 
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
Kinesis + Elasticsearchでつくるさいきょうのログ分析基盤
 
20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編
20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編
20180914 security iotlt#1_ほんとうにあった怖い話_aws_iot編
 
DevOps with Database on AWS
DevOps with Database on AWSDevOps with Database on AWS
DevOps with Database on AWS
 
リクルートのWebサービスを支える「RAFTEL」
リクルートのWebサービスを支える「RAFTEL」リクルートのWebサービスを支える「RAFTEL」
リクルートのWebサービスを支える「RAFTEL」
 
SageMakerでもAUTOMATIC1111したい
SageMakerでもAUTOMATIC1111したいSageMakerでもAUTOMATIC1111したい
SageMakerでもAUTOMATIC1111したい
 

Viewers also liked

AWS Black Belt Techシリーズ Amazon Cognito / Amazon Mobile Analytics
AWS Black Belt Techシリーズ  Amazon Cognito / Amazon Mobile AnalyticsAWS Black Belt Techシリーズ  Amazon Cognito / Amazon Mobile Analytics
AWS Black Belt Techシリーズ Amazon Cognito / Amazon Mobile AnalyticsAmazon Web Services Japan
 
AWS Mobile SDK利用時のテスト手法
AWS Mobile SDK利用時のテスト手法AWS Mobile SDK利用時のテスト手法
AWS Mobile SDK利用時のテスト手法yuki0211s
 
Atomic designで助かった人たち
Atomic designで助かった人たちAtomic designで助かった人たち
Atomic designで助かった人たちIida Yukako
 
React を導入した フロントエンド開発
React を導入したフロントエンド開発React を導入したフロントエンド開発
React を導入した フロントエンド開発 daisuke-a-matsui
 
SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427
SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427
SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427Tatsuo Sakamoto
 
Atomic Design powered by React @ AbemaTV
Atomic Design powered by React @ AbemaTVAtomic Design powered by React @ AbemaTV
Atomic Design powered by React @ AbemaTVYusuke Goto
 
[AWSマイスターシリーズ] AWS SDK for Java / .NET
[AWSマイスターシリーズ] AWS SDK for Java / .NET[AWSマイスターシリーズ] AWS SDK for Java / .NET
[AWSマイスターシリーズ] AWS SDK for Java / .NETAmazon Web Services Japan
 
AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]
AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]
AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]Amazon Web Services Japan
 
AWS Black Belt Techシリーズ Amazon AppStream
AWS Black Belt Techシリーズ  Amazon AppStreamAWS Black Belt Techシリーズ  Amazon AppStream
AWS Black Belt Techシリーズ Amazon AppStreamAmazon Web Services Japan
 
AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門Amazon Web Services Japan
 
SAP on AWS 実際の導入例と導入効果
SAP on AWS 実際の導入例と導入効果SAP on AWS 実際の導入例と導入効果
SAP on AWS 実際の導入例と導入効果Amazon Web Services Japan
 
Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行
Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行
Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行Amazon Web Services Japan
 
AWS Black Belt Online Seminar 10 Years of AWS
AWS Black Belt Online Seminar 10 Years of AWSAWS Black Belt Online Seminar 10 Years of AWS
AWS Black Belt Online Seminar 10 Years of AWSAmazon Web Services Japan
 
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows PowershellAWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows PowershellAmazon Web Services Japan
 
初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しよう初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しようAmazon Web Services Japan
 
WS Black Belt Online Seminar 2016 RDBのAWSへの移行
WS Black Belt Online Seminar 2016 RDBのAWSへの移行WS Black Belt Online Seminar 2016 RDBのAWSへの移行
WS Black Belt Online Seminar 2016 RDBのAWSへの移行Amazon Web Services Japan
 
AWS Black Belt Techシリーズ AWS re:Invent 2014 最新情報のアップデート
AWS Black Belt Techシリーズ  AWS re:Invent 2014 最新情報のアップデートAWS Black Belt Techシリーズ  AWS re:Invent 2014 最新情報のアップデート
AWS Black Belt Techシリーズ AWS re:Invent 2014 最新情報のアップデートAmazon Web Services Japan
 
20120625 aws meister-reloaded-sg-vmie-public
20120625 aws meister-reloaded-sg-vmie-public20120625 aws meister-reloaded-sg-vmie-public
20120625 aws meister-reloaded-sg-vmie-publicAmazon Web Services Japan
 
[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js
[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js
[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.jsAmazon Web Services Japan
 

Viewers also liked (20)

AWS Black Belt Techシリーズ Amazon Cognito / Amazon Mobile Analytics
AWS Black Belt Techシリーズ  Amazon Cognito / Amazon Mobile AnalyticsAWS Black Belt Techシリーズ  Amazon Cognito / Amazon Mobile Analytics
AWS Black Belt Techシリーズ Amazon Cognito / Amazon Mobile Analytics
 
AWS Mobile SDK利用時のテスト手法
AWS Mobile SDK利用時のテスト手法AWS Mobile SDK利用時のテスト手法
AWS Mobile SDK利用時のテスト手法
 
Atomic designで助かった人たち
Atomic designで助かった人たちAtomic designで助かった人たち
Atomic designで助かった人たち
 
React を導入した フロントエンド開発
React を導入したフロントエンド開発React を導入したフロントエンド開発
React を導入した フロントエンド開発
 
SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427
SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427
SDK不要で高パフォーマンス!AppLovinのネイティブ広告_20160427
 
Atomic Design powered by React @ AbemaTV
Atomic Design powered by React @ AbemaTVAtomic Design powered by React @ AbemaTV
Atomic Design powered by React @ AbemaTV
 
Provisioning & Deploy on AWS
Provisioning & Deploy on AWSProvisioning & Deploy on AWS
Provisioning & Deploy on AWS
 
[AWSマイスターシリーズ] AWS SDK for Java / .NET
[AWSマイスターシリーズ] AWS SDK for Java / .NET[AWSマイスターシリーズ] AWS SDK for Java / .NET
[AWSマイスターシリーズ] AWS SDK for Java / .NET
 
AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]
AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]
AWS 初心者向けWebinar AWS上にWebサーバシステムを作ってみましょう~まずは仮想サーバーから[演習つき]
 
AWS Black Belt Techシリーズ Amazon AppStream
AWS Black Belt Techシリーズ  Amazon AppStreamAWS Black Belt Techシリーズ  Amazon AppStream
AWS Black Belt Techシリーズ Amazon AppStream
 
AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門AWS初心者向けWebinar .NET開発者のためのAWS超入門
AWS初心者向けWebinar .NET開発者のためのAWS超入門
 
SAP on AWS 実際の導入例と導入効果
SAP on AWS 実際の導入例と導入効果SAP on AWS 実際の導入例と導入効果
SAP on AWS 実際の導入例と導入効果
 
Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行
Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行
Blackbelt Online Serminar Parse.comからAWSへのモバイルアプリの移行
 
AWS Black Belt Online Seminar 10 Years of AWS
AWS Black Belt Online Seminar 10 Years of AWSAWS Black Belt Online Seminar 10 Years of AWS
AWS Black Belt Online Seminar 10 Years of AWS
 
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows PowershellAWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
 
初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しよう初心者向けWebinar AWSでDRを構築しよう
初心者向けWebinar AWSでDRを構築しよう
 
WS Black Belt Online Seminar 2016 RDBのAWSへの移行
WS Black Belt Online Seminar 2016 RDBのAWSへの移行WS Black Belt Online Seminar 2016 RDBのAWSへの移行
WS Black Belt Online Seminar 2016 RDBのAWSへの移行
 
AWS Black Belt Techシリーズ AWS re:Invent 2014 最新情報のアップデート
AWS Black Belt Techシリーズ  AWS re:Invent 2014 最新情報のアップデートAWS Black Belt Techシリーズ  AWS re:Invent 2014 最新情報のアップデート
AWS Black Belt Techシリーズ AWS re:Invent 2014 最新情報のアップデート
 
20120625 aws meister-reloaded-sg-vmie-public
20120625 aws meister-reloaded-sg-vmie-public20120625 aws meister-reloaded-sg-vmie-public
20120625 aws meister-reloaded-sg-vmie-public
 
[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js
[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js
[AWSマイスターシリーズ] AWS SDK for PHP / Ruby / boto(Python) / JavaScript in Node.js
 

Similar to [AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-

AWSマイスターシリーズReloaded -AWS SDK for .NET-
AWSマイスターシリーズReloaded -AWS SDK for .NET-AWSマイスターシリーズReloaded -AWS SDK for .NET-
AWSマイスターシリーズReloaded -AWS SDK for .NET-Amazon Web Services Japan
 
20200630 AWS Black Belt Online Seminar Amazon Cognito
20200630 AWS Black Belt Online Seminar Amazon Cognito20200630 AWS Black Belt Online Seminar Amazon Cognito
20200630 AWS Black Belt Online Seminar Amazon CognitoAmazon Web Services Japan
 
AWS re:Invent 2019 Recap IoT アップデート
AWS re:Invent 2019 Recap IoT アップデートAWS re:Invent 2019 Recap IoT アップデート
AWS re:Invent 2019 Recap IoT アップデートAmazon Web Services Japan
 
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!Yusuke Kodama
 
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例Amazon Web Services Japan
 
[AWSマイスターシリーズ] AWS Elastic Beanstalk
[AWSマイスターシリーズ] AWS Elastic Beanstalk[AWSマイスターシリーズ] AWS Elastic Beanstalk
[AWSマイスターシリーズ] AWS Elastic BeanstalkAmazon Web Services Japan
 
[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)
[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)
[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)Amazon Web Services Japan
 
20151030 オープンデータとセキュリティon aws
20151030 オープンデータとセキュリティon aws20151030 オープンデータとセキュリティon aws
20151030 オープンデータとセキュリティon awstakaoka susumu
 
いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2Yasuhiro Matsuo
 
Amazon Cognito Deep Dive @ JAWS DAYS 2016
Amazon Cognito Deep Dive @ JAWS DAYS 2016Amazon Cognito Deep Dive @ JAWS DAYS 2016
Amazon Cognito Deep Dive @ JAWS DAYS 2016akitsukada
 
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編Amazon Web Services Japan
 
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨Amazon Web Services Japan
 
AWS が提供する IoT ソリューションと ITS における活用
AWS が提供する IoT ソリューションと ITS における活用AWS が提供する IoT ソリューションと ITS における活用
AWS が提供する IoT ソリューションと ITS における活用Amazon Web Services Japan
 
Amazon EKS上の開発体験を最大化するプレビュー環境の作り方
Amazon EKS上の開発体験を最大化するプレビュー環境の作り方Amazon EKS上の開発体験を最大化するプレビュー環境の作り方
Amazon EKS上の開発体験を最大化するプレビュー環境の作り方理弘 山崎
 
ビッグデータサービス群のおさらい & AWS Data Pipeline
ビッグデータサービス群のおさらい & AWS Data Pipelineビッグデータサービス群のおさらい & AWS Data Pipeline
ビッグデータサービス群のおさらい & AWS Data PipelineAmazon Web Services Japan
 
[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormation[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormationAmazon Web Services Japan
 
AlexaのSmart HomeをAWSで作る方法
AlexaのSmart HomeをAWSで作る方法AlexaのSmart HomeをAWSで作る方法
AlexaのSmart HomeをAWSで作る方法Jun Ichikawa
 

Similar to [AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript- (20)

AWS SDK for Android and iOS
AWS SDK for Android and iOSAWS SDK for Android and iOS
AWS SDK for Android and iOS
 
AWSマイスターシリーズReloaded -AWS SDK for .NET-
AWSマイスターシリーズReloaded -AWS SDK for .NET-AWSマイスターシリーズReloaded -AWS SDK for .NET-
AWSマイスターシリーズReloaded -AWS SDK for .NET-
 
AWS Black Belt Techシリーズ AWS SDK
AWS Black Belt Techシリーズ AWS SDKAWS Black Belt Techシリーズ AWS SDK
AWS Black Belt Techシリーズ AWS SDK
 
20200630 AWS Black Belt Online Seminar Amazon Cognito
20200630 AWS Black Belt Online Seminar Amazon Cognito20200630 AWS Black Belt Online Seminar Amazon Cognito
20200630 AWS Black Belt Online Seminar Amazon Cognito
 
Gaming cicd-pipeline gaming-technight-2
Gaming cicd-pipeline gaming-technight-2Gaming cicd-pipeline gaming-technight-2
Gaming cicd-pipeline gaming-technight-2
 
AWS re:Invent 2019 Recap IoT アップデート
AWS re:Invent 2019 Recap IoT アップデートAWS re:Invent 2019 Recap IoT アップデート
AWS re:Invent 2019 Recap IoT アップデート
 
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
 
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
[よくわかるクラウドデータベース] CassandraからAmazon DynamoDBへの移行事例
 
[AWSマイスターシリーズ] AWS Elastic Beanstalk
[AWSマイスターシリーズ] AWS Elastic Beanstalk[AWSマイスターシリーズ] AWS Elastic Beanstalk
[AWSマイスターシリーズ] AWS Elastic Beanstalk
 
[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)
[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)
[AWSマイスターシリーズ] Amazon Virtual Private Cloud (VPC)
 
20151030 オープンデータとセキュリティon aws
20151030 オープンデータとセキュリティon aws20151030 オープンデータとセキュリティon aws
20151030 オープンデータとセキュリティon aws
 
いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2
 
Amazon Cognito Deep Dive @ JAWS DAYS 2016
Amazon Cognito Deep Dive @ JAWS DAYS 2016Amazon Cognito Deep Dive @ JAWS DAYS 2016
Amazon Cognito Deep Dive @ JAWS DAYS 2016
 
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編
 
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
 
AWS が提供する IoT ソリューションと ITS における活用
AWS が提供する IoT ソリューションと ITS における活用AWS が提供する IoT ソリューションと ITS における活用
AWS が提供する IoT ソリューションと ITS における活用
 
Amazon EKS上の開発体験を最大化するプレビュー環境の作り方
Amazon EKS上の開発体験を最大化するプレビュー環境の作り方Amazon EKS上の開発体験を最大化するプレビュー環境の作り方
Amazon EKS上の開発体験を最大化するプレビュー環境の作り方
 
ビッグデータサービス群のおさらい & AWS Data Pipeline
ビッグデータサービス群のおさらい & AWS Data Pipelineビッグデータサービス群のおさらい & AWS Data Pipeline
ビッグデータサービス群のおさらい & AWS Data Pipeline
 
[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormation[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormation
 
AlexaのSmart HomeをAWSで作る方法
AlexaのSmart HomeをAWSで作る方法AlexaのSmart HomeをAWSで作る方法
AlexaのSmart HomeをAWSで作る方法
 

More from Amazon Web Services Japan

202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)Amazon Web Services Japan
 
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFSAmazon Web Services Japan
 
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
202204 AWS Black Belt Online Seminar AWS IoT Device Defender202204 AWS Black Belt Online Seminar AWS IoT Device Defender
202204 AWS Black Belt Online Seminar AWS IoT Device DefenderAmazon Web Services Japan
 
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現Amazon Web Services Japan
 
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...Amazon Web Services Japan
 
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデートAmazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデートAmazon Web Services Japan
 
20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したこと20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したことAmazon Web Services Japan
 
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用Amazon Web Services Japan
 
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdfAmazon Web Services Japan
 
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介Amazon Web Services Japan
 
Amazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon Web Services Japan
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことAmazon Web Services Japan
 
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチAmazon Web Services Japan
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介Amazon Web Services Japan
 
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer ProfilesAmazon Web Services Japan
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Web Services Japan
 
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介Amazon Web Services Japan
 
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介Amazon Web Services Japan
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...Amazon Web Services Japan
 

More from Amazon Web Services Japan (20)

202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
 
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
 
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
202204 AWS Black Belt Online Seminar AWS IoT Device Defender202204 AWS Black Belt Online Seminar AWS IoT Device Defender
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
 
Infrastructure as Code (IaC) 談義 2022
Infrastructure as Code (IaC) 談義 2022Infrastructure as Code (IaC) 談義 2022
Infrastructure as Code (IaC) 談義 2022
 
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
 
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
 
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデートAmazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
 
20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したこと20220409 AWS BLEA 開発にあたって検討したこと
20220409 AWS BLEA 開発にあたって検討したこと
 
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
 
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
 
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
 
Amazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDDAmazon QuickSight の組み込み方法をちょっぴりDD
Amazon QuickSight の組み込み方法をちょっぴりDD
 
マルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのことマルチテナント化で知っておきたいデータベースのこと
マルチテナント化で知っておきたいデータベースのこと
 
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
 
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
 
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
 
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
 
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
 

[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-

  • 1. re:G ene rate AWSマイスターシリーズ   AWS  Client-‐‑‒side  SDK -‐‑‒  Android,  iOS  and  Javascript  -‐‑‒ 2014.2.5 ソリューションアーキテクト 安川  健太   今井  雄太 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 2. Agenda !   AWS  SDK  オーバービュー !   クライアント側SDKの活⽤用法 !   クライアント側SDKにおけるAWS  Credentialsの取り扱い !   各クライアント側SDKの紹介 •  AWS  SDK  for  Android •  AWS  SDK  for  iOS •  AWS  SDK  for  JavaScript  in  the  Browser !   まとめ © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 3. AWS  SDK  オーバービュー © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 4. AWSのサービス操作と⾔言えば AWS  Management  Console AWSコマンドラインツール © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 5. これらの裏裏側では・・・ !    各サービスの各操作にAPIが定義されている !   AWSでは・・・ •  ⼈人間がGUIまたはCUI越しに叩く •  プログラミングしてそれを⾃自動化・簡易易化・カスタ マイズ •  ⼈人間が⼿手でやらなくてはいけない事をプログラミングして⾃自 動化できる、これがSDKで簡単に実現可能 à  AWSの実は最も優れた⼀一⾯面 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 6. AWS  SDKとは !   AWSのサービスをプログラムで操作できるSDK •  さまざまな⾔言語で •  •  •  •  •  •  •  •  •  •  AWS  SDK  for  Java AWS  SDK  for  .Net AWS  SDK  for  Ruby AWS  SDK  for  PHP AWS  SDK  for  Python  (boto) AWS  SDK  for  node.js AWS  SDK  for  Android AWS  SDK  for  iOS AWS  SDK  for  Javascript  in  Browser 有志の⽅方による実装(ActionScript)も •  通信は原則HTTPS © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 7. SDK⼀一般の動作イメージ 起動、停⽌止 REST AWS  SDK SOAP Put,Get DB起動 バックアップ 認証情報 情報取得 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 9. クライアント側SDKの活⽤用法 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 10. AWSのマネージドサービスを活⽤用した 2-‐‑‒tierのアーキテクチャが組める !   モバイル端末やブラウザからAWSの各種サービスを呼ぶ •  AWSのマネージドサービスを組み合わせてバックエンドに •  しかもプラットフォーム横断で連携! © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 12. 例例2:  モバイルアプリ間でメッセージング !   AWSサービスのみで作るチャットアプリ •  サーバ側のコーディングなしで掲⽰示板/チャットサービスを提供 DynamoDB ・メッセージの保存 ・チャットグループとメッセージの紐紐付 Simple  Notification  Service  (SNS) ・新規メッセージの通知 Simple  Queue  Service  (SQS) ・SNSの通知受け⼝口 Simple  Storage  Service  (S3) ・画像等のデータの保存先・配信元 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 13. 例例2:  モバイルアプリ間でメッセージング ! DynamoDB,  S3を使ってデータ共有 2.  DBクエリ  /   ファイルリクエスト DynamoDB 1.  DB書き込み  /   ファイルアップロード 3.  DB応答  /   ファイルダウンロード S3 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 14. 例例2:  モバイルアプリ間でメッセージング !   SNSとSQSを使ってPub/Sub SNS:  Simple  Notification  Service SQS:  Simple  Queue  Service + SNS  topic SQS  queue 2.  Notify 1.  Publish © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 15. 例例2:  モバイルアプリ間でメッセージング チャットグループへのSubscribe !   過去メッセージはDynamoDBから取得 !   SQSでキューを作成し、SNSにSubscribe 1.  SQSのキューを作成 チャットグループの SNSトピック 2.  SNSトピックにSubscribe 4.  SNSトピックにPublish 5.  SQSを通じて通知 クライアントA 0.  メッセージ ⼀一覧取得 クライアントB 3.  新メッセージ書き込み © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 16. 例例2:  モバイルアプリ間でメッセージング チャットグループへのファイルアップロード !   S3にファイルをアップロード !   SNSで通知 チャットグループの SNSトピック 3.  SNSトピックにPublish 4.  SQSを通じて通知 クライアントA 5.  ファイルダウンロード 2.  メッセージ書き込み クライアントB 1.  ファイルアップロード © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 17. その他の例例 ⾮非同期バッチ処理理 !   ⾮非同期バッチ処理理要求を直接登録 •  通常のWebアプリ等 Job  queue Client Workers Web  Frontend •  Android/iOS/Javascript  SDKを使った場合 Job  queue Workers © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 18. その他の例例 ログやイベント情報の集計処理理 !   ログやイベント情報を直接登録 •  通常のWebアプリ等 Client Web  Frontend ログ・イベント集計 •  Android/iOS/Javascript  SDKを使った場合 ログ・イベント集計 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 19. Amazon  SNSへのデバイストークンの登録も直接可能 Apple  Devices Google  Devices ント・ 3.  エンドポイ ユーザ情報登録 2.  エ ンド ポイ ント Amazon  Kindle  Fire  Devices エンドポイント 取得 Push通知 Amazon  SNS Mobile  Push © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 20. クライアント側SDK活⽤用のメリット !   アプリの開発に多くのメリット: •  •  •  •  バックエンド側の開発コストを最⼩小化 バックエンド側の運⽤用コストを最⼩小化 スケーラビリティの⼼心配なし ⾦金金額⾯面でもローコスト(当社⽐比*) !   必要に応じてEC2も導⼊入できる安⼼心感 •  後からバックエンド側にロジックを⼊入れてシステムの最適化 *  EC2で同規模のサーバを⽴立立てる場合に⽐比べ © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 21. AWS  CREDENTIALSの取扱い © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 22. 誰のAWSアカウントを使う? !   AWSのコンソールアプリを作る場合 •  エンドユーザはAWSユーザ àAWSのアクセスキーとシークレットキーを⼊入⼒力力してもらえばOK !   AWSの各種サービスを使ったアプリを作る場合 •  AWSの各種サービスはあくまでバックエンド •  エンドユーザは必ずしもAWSユーザではない àアプリは開発者のアカウントで認証・認可を受ける必要 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 23. 開発者アカウントを使うとして… !   アプリに開発者アカウントのアクセスキー等を埋め込ん だら •  アクセスキーが広範にばら撒かれることに •  アクセスキーの不不正利利⽤用を⽌止めるためにキーを無効化したら à全ユーザへのサービスが停⽌止!! !   アクセスキーの定期的な更更新で対処するにしても •  更更新のたびにバージョンアップは⾮非現実的 •  更更新前のアプリからはサービス利利⽤用不不可に © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 24. セキュアなAWSアクセスを提供するには !   アプリに認証情報を埋め込むべきではない !   エンドユーザ/端末ごとに異異なるCredentialsを提供すべ き •  ユーザごとに必要最⼩小限の権限を与えるのは重要 •  不不正利利⽤用発覚時に不不正ユーザのみ権限を停⽌止 !   Credentialsは期限が来たら無効化されるべき •  不不正ユーザの影響も期限付きに これを実現する仕組みあります! © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 25. Security  Token  Service !   AWSに対する、⼀一時的な認証情報を作成する仕組み •  期限付きの認証情報(認証チケット)を発⾏行行 •  Identity  and  Access  Management  (IAM)サービスの機能 !   ユーザーに対して、以下の3つのキーを発⾏行行 §  アクセスID §  シークレットキー §  セッショントークン !   作成した認証情報の有効期限設定が可能 §  デフォルト12時間  最⼩小1時間  最⼤大36時間 §  ただし延⻑⾧長・短縮は出来ない 但し、STS⾃自体は認証の機能を持たないため、認証の仕組みは別途必要 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 26. 認証機構とSTSとを インテグレーションする際の選択肢 {Facebook,  Google,   Amazon}  のIDで認証 Yes Web  Identity   Federationを利利⽤用可! Yes Identity  TVMが選択 肢に No 独⾃自の認証付き Token  Vending   Machine  (TVM)実装 が必要 ユーザごとに異異なる権限を 与える必要あり No Anonymous  TVMが選択肢に © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 27. Web Identity Federation !   Web Identity Providerの認証結果を受けてAWSの各種 サービスへのアクセスを認可する仕組み !   IAM RoleのAssume機能を利用して実現 •  Web Identity Providerによって認証されたユーザは特定のIAM Role を持つものと見なす(Assume)する !   対応Identity Providerは •  Facebook •  Google •  Amazon © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 28. Web  Identity  Federationの動作フロー STS⾃自体が認証済みユーザに アクセストークンを発⾏行行する Token  Vending  Machine   (TVM)の役割を担っている 詳細はマイスターシリーズIAM回を参照:   http://www.slideshare.net/AmazonWebServicesJapan/20130716-‐‑‒aws-‐‑‒meisterregenerateiampublic © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 29. Web  Identity  Federation利利⽤用時のコード例例 !   Android WebIdentityFederationSessionCredentialsProvider  wif  =                  new  WebIdentityFederationSessionCredentialsProvider(fbSession.getAccessToken(),                                                                                                                          "graph.facebook.com",                                                                                                                          ROLE_̲ARN); String  subjectFromWIF  =  wif.getSubjectFromWIF();   s3  =  new  AmazonS3Client(wif); ! iOS AmazonWIFCredentialsProvider  *wif  =  [[AmazonWIFCredentialsProvider  alloc] initWithRole:ROLE_̲ARN andWebIdentityToken:self.session.accessTokenData.accessToken                                                                fromProvider:@"graph.facebook.com"]; NSString  *subjectFromWIF  =  wif.subjectFromWIF; s3  =  [[[AmazonS3Client  alloc]  autorelease]  initWithCredentialsProvider:wif]; © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 30. 独⾃自の認証機構を⽤用いる場合 Token  Vending  Machine  (TVM)を導⼊入 •  ユーザ/端末の認証とトークンの発⾏行行を実施 •  アプリケーションごとの認証とSTSを結びつけるための仕組み 1.  Security  Token  Serviceか ら認証トークンを取得 1  STSから 2.  クライアントに認証トーク ンを提供 3.  クライアントは認証トーク ンを⽤用いてAWSにアクセス 3 アプリの認証 機構に合わせて 任意の実装 1 2 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 31. TVMの実装⽅方針を⼤大別すると ! AnonymousTVM •  ユーザ認証を必要とせず、⼀一時認証トークンの機能のみ利利⽤用し たいユースケース向け •  例例:誰でも参加出来る掲⽰示板システム、ログの記録 ! IdentityTVM •  ユーザ認証を実施し、認証されたユーザにのみ認証トークンを 発⾏行行するユースケース向け •  例例:ユーザ認証を伴うソーシャルアプリ、ゲーム等 どちらもサンプルの実装がサーバ側・クライアント側とも公開されている © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 32. Anonymous  TVM !   デバイス固有のIDと対応する秘密鍵をTVMに登録 !   秘密鍵を使って認証トークンを暗号化して提供 デバイス固有のID と秘密鍵を登録 秘密鍵を使って © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 34. Web  Identityを⽤用いた Fine  Grained  Access  Control !   例例1:  S3バケット内にユーザごとのプライベートな領領域 を作成 {  "Version":"2012-‐‑‒10-‐‑‒17",      "Statement":[      {  "Effect":"Allow",        "Action":["s3:GetObject",  "s3:PutObject",  "s3:DeleteObject"],          "Resource":[                "arn:aws:s3:::myBucket/myApp/${graph.facebook.com:id}",                  "arn:aws:s3:::myBucket/myApp/${graph.facebook.com:id}/*“          ]    }  ] Facebookにログインした } ユーザーのIDが⼊入る © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 35. Web  Identityを⽤用いた Fine  Grained  Access  Control !   例例2:  DynamoDBのテーブル内にユーザごとにプライ ベートな⾏行行/列列を定義する  "Condition":  {                "ForAllValues:StringEquals":  {                    "dynamodb:LeadingKeys":  [                        "${www.amazon.com:user_̲id}"                    ],                    "dynamodb:Attributes":  [                        "UserId”,"GameTitle”,  "Wins”,  "Losses”                    ]                },                "StringEqualsIfExists":  {                    "dynamodb:Select":  "SPECIFIC_̲ATTRIBUTES"                }            } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 36. 各クライアント側SDKの紹介 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 37. AWS  SDK  FOR  ANDROID © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 38. AWS  SDK  for  Androidとは !   Amazon提供のAWS開発⽤用のAndroid向けSDK !   公式ページ:http://aws.amazon.com/jp/sdkforandroid/ !   環境:Android  2.3  (API  level  10)以上 !   利利⽤用⽅方法 •  公式ページからダウンロード •  Gitレポジトリから Mavenをお使いの場合: 公式MavenレポジトリLocalレポジトリにインストー ルしての利利⽤用は可(但し、正式サポートの範囲外) © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 39. 操作可能サービス EC2 S3 DynamoDB SimpleDB SNS SQS SES ELB CloudWatch Autoscaling ※サポートするサービスの範囲はiOS  SDKと同様 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 40. SDKに含まれるもの !   AWS  Android  ライブラリ •  各種サービス向けAPIを提供するJavaライブラリ •  Androidアプリのプロジェクトから参照 •  最終的にはAPKに内包 !   ソースコード !   ドキュメント (コードサンプルはGitレポジトリに移動) https://github.com/awslabs/aws-‐‑‒sdk-‐‑‒android-‐‑‒samples •  •  •  •  •  •  各種サービスの操作 SNSとSQSを使ったメッセージボード S3アップローダ SimpleDB  ハイスコア SESフィードバックフォーム DynamoDBを使ったユーザプリファレンス © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 41. 初期設定 !   プロジェクトの依存関係にAndroid  SDKを追加 •  EclipseとAndroid  SDKを使っている場合の例例: 必要なライブラリをプロジェ クトのlibs配下にコピー 注:他の場所に配置する場合は最終的なAPKにクラスファ イルが含まれるようにすること © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 42. 依存するJarファイルについてTips !   開発時はデバッグシンボル付きのライブラリを使⽤用 aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒debug.jar aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒ddb-‐‑‒mapper-‐‑‒debug.jar !   配布時は必要なサービスのみ同梱 全部⼊入り aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>.jar aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒ddb-‐‑‒mapper.jar DynamoDBMapper を使う場合に必要 必要なサービスのみ aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒core.jar          +        aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒ddb.jar aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒s3.jar aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒sns.jar aws-‐‑‒android-‐‑‒sdk-‐‑‒<version>-‐‑‒sqs.jar あるいはproguardを使って必要なパッケージのみ同梱 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 43. コード例例 !   基本的な流流れ(iOSも同様) •  •  •  •  利利⽤用するサービスのクライアントオブジェクトの作成 サービスのリクエストオブジェクトを作成 クライアントオブジェクトを通じてリクエスト レスポンスを受け取る S3にファイルをアップロードする例例 void  uploadToS3  (String  bucketName,  String  objectName,  File  file){      AmazonCredentials  credentials  =   new  BasicAmazonCredentials(ACCESS_̲KEY,  SECRET_̲KEY);      AmazonS3Client  s3  =  new  AmazonS3Client(credentials);      PutObjectRequest  req  =  new  PutObjectRequest(bucketName,  objectName,  file));      PutObjectResponse  resp  =  s3.putObject(req); } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 44. コード例例:S3へのアップロード  (⾮非同期) S3UploadTask  uploadTask  =  new  S3UploadTask(); uploadTask.execute(new  PutObjectRequest(bucketName,  objectName,  tempFile)); private  class  S3UploadTask  extends  AsyncTask<PutObjectRequest,  Long,  Long>   implements  ProgressListener  { protected  Long  totalSent; バック グラウ ンド実 ⾏行行 //  AsyncTask#doInBackground() protected  Long  doInBackground  (PutObjectRequest...  reqs)  { totalSent  =  0L; reqs[0].setProgressListener(this); S3.getInstance().putObject(reqs[0]); return  totalSent; }  //  ProgressListener#progressChanged() 進⾏行行状 public  void  progressChanged  (ProgressEvent  progressEvent)  { totalSent   +=  progressEvent.getBytesTransfered(); publishProgress(totalSent); 況の更更 } 新 } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 45. コード例例:DynamoDBへのQuery ハッシュキーとレンジキーのMaxを指定して特定のテーブルにクエリを送る例 QueryResult doQuery (String hashKey, String max) { ハッシュ キーを AttributeValue hashKey = new AttributeValue().withS(hashKey); 指定 Condition lessThanMax = new Condition() .withComparisonOperator(ComparisonOperator.LT) 条件を .withAttributeValueList(new AttributeValue().withN(max)); 指定 QueryResult result = dynamoClient.query(new QueryRequest() .withTableName(TABLE_NAME) クエリを .withLimit(NUMBER_OF_ITEMS_TO_GET_AT_ONCE) 実行 .withHashKeyValue(hashKey) .withRangeKeyCondition(lessThanMax) ); return result; } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 46. コード例例:DynamoDBMapperで DynamoDBにオブジェクトを永続化 POJOを定義 @DynamoDBTable(tableName = “meisters_items”) public class MeistersItem { private String id; private long value; @DynamoDBHashKey(attributeName = “id”) public String getId() { return id; } @DynamoDBHashKey(attributeName = “id”) public void setId(String id) { this.id = id; } @DynamoDBAttribute(attributeName = “value”) public long getValue() { return time; } } DynamoDBMapperを初期化 AmazonDynamoDBClient dynamoClient = new AmazonDynamoDBClient(getCredentials()); AmazonDynamoDBMapper dbMapper = new DynamoDBMapper(getDynamoClient()); POJOの保存 MeisterItem item = new MeisterItem(); item.setId(“Expensive item”); item.setValue(10000); dbMapper.save(item); POJOの読み込み MeisterItem item = dbMapper.load(MeisterItem.class, “Expensive item”); @DynamoDBAttribute(attributeName = “value”) public void setValue(long time) { this.time = time; } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 47. Android  SDK利利⽤用時のTips !   UIスレッドからAWSのAPIを呼ぶのは避ける •  適宜AsyncTaskや別Threadを使⽤用 !   各サービスクライアントのインスタンスは再利利⽤用 •  サービスクライアントの実装はThread  Safe •  Singletonにすることで重いオブジェクト⽣生成を最⼩小限に •  例例:サンプル内のAmazonClientManager public  class  AmazonClientManager  {  //  下記コードは簡易易版        private  AmazonS3Client  s3Client  =  null;        public  AmazonS3Client  s3()  {                if  (s3Client  ==  null)  s3Client  =  new  AmazonS3Client(  credentials  );                return  s3Client;        }  } !   ユースケース別の解説付きコードサンプルがこちらに: •  http://aws.amazon.com/articles/SDKs/Android © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 48. AWS  SDK  FOR  IOS © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 49. AWS  SDK  for  iOSとは !   Amazon提供のAWS開発⽤用iOS  SDK !   公式ページ: http://aws.amazon.com/jp/sdkforios/ !   動作環境:iOS  4.3以上   !   開発環境:Xcode  v4以上 !   利利⽤用⽅方法 •  公式ページからダウンロード •  Gitレポジトリから © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 50. 操作可能サービス EC2 S3 DynamoDB SimpleDB SNS SQS SES ELB CloudWatch Autoscaling ※サポートするサービスの範囲はAndroid  SDKと同様 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 51. SDKに含まれるもの !   AWS  iOSライブラリ •  各種サービス向けAPIを提供するObjective-‐‑‒Cライブラリ •  iOSアプリプロジェクトのフレームワークの1つとして参照 !   ドキュメント !   ソースコード (コードサンプルはGitレポジトリに移動) https://github.com/awslabs/aws-‐‑‒sdk-‐‑‒ios-‐‑‒samples •  •  •  •  •  •  •  各種サービスの操作 SNSとSQSを使ったメッセージボード S3アップローダ SimpleDB  ハイスコア SESフィードバックフォーム DynamoDBを使ったユーザプリファレンス DynamoDB  を  CoreDataフレームワークのバックエンドに © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 52. 初期設定   〜~Frameworkの追加〜~ !   プロジェクトにSDKを追加 1.  Xcodeにてプロジェクトを開く 2.  Frameworks  GroupをCtrlを押しながら クリック 3.  AWSiOSSDK.frameworkを追加 •  AWSPersistence.frameworkは任意 (DynamoDB  +  CoreDataを使った Persistenceを利利⽤用する場合) 4.  ソースコードで必要なヘッダファイルを インクルード •  例例 #import  <AWSiOSSDK/S3/AmazonS3Client.h> #import  <AWSiOSSDK/SimpleDB/AmazonSimpleDBClient.h> #import  <AWSiOSSDK/SQS/AmazonSQSClient.h> #import  <AWSiOSSDK/SNS/AmazonSNSClient.h> © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 53. 初期設定   〜~ドキュメントのインストール〜~ !   ドキュメントセットをXcodeにインストール •  SDKのディレクトリからdocsetファイルをコピー •  これを   –  •  Documentation/com.amazon.aws.ios.docset ここに   –  $HOME/Library/Developer/Shared/Documentaion/DocSets $  mkdir  –p  $HOME/Library/Developer/Shared/Documentaion/DocSets $  cp  Documentation/com.amazon.aws.ios.docset   $HOME/Library/Developer/Shared/Documentaion/DocSets •  Xcodeを再起動 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 54. コード例例 !   基本的な流流れ  (Androidも同様) •  •  •  •  利利⽤用するサービスのクライアントオブジェクトの作成 サービスのリクエストオブジェクトを作成 クライアントオブジェクトを通じてリクエスト レスポンスを受け取る S3にファイルをアップロードする例例 -‐‑‒  void  uploadToS3:  (NSString*)  bucketName  keyName:  (NSString  *)  keyName  fileName:   (NSString  *)  fileName  {      S3PutObjectRequest  *putObjectRequest  =                [[[S3PutObjectRequest  alloc]  initWithKey:keyName  inBucket:bucketName]  autorelease];        putObjectRequest.filename  =  fileName;        [[AmazonClientManager  s3]  putObject:putObjectRequest]; } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 55. コード例例:S3へのアップロード(⾮非同期) 1/2   NSOperationのサブクラスとしてS3 Uploaderを実装 #import <Foundation/Foundation.h> #import <AWSiOSSDK/AmazonServiceRequest.h> @interface AsyncImageUploader:NSOperation<AmazonServiceRequestDelegate> { … - (void) start { …. // Puts the file as an object in the bucket. S3PutObjectRequest *putObjectRequest = [[[S3PutObjectRequest alloc] initWithKey:keyName inBucket:bucketName] autorelease]; putObjectRequest.filename = filename; Delegateとして途中経過や結果を受け putObjectRequest.delegate = self; 取れるように登録 [[AmazonClientManager s3] putObject:putObjectRequest]; } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 56. コード例例:S3へのアップロード(⾮非同期) 2/2   Delegateパターンで途中経過や結果を受け取り 完了時 の処理 -(void) request:(AmazonServiceRequest *)request didCompleteWithResponse:(AmazonServiceResponse *)response { [self performSelectorOnMainThread:@selector(hideProgressView) withObject:nil waitUntilDone:NO]; [self finish]; } 進行状 況の更 新処理 -(void) request:(AmazonServiceRequest *)request didSendData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger) totalBytesWritten totalBytesExpectedToWrite:(NSInteger) totalBytesExpectedToWrite { [self performSelectorOnMainThread:@selector(updateProgressView:) withObject: [NSNumber numberWithFloat:  (float)totalBytesWritten / totalBytesExpectedToWrite] waitUntilDone:NO]; } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 57. コード例例:DynamoDBへのQuery -(DynamoDynamoDBQueryResponse *) doQuery: (NSString*) hashKey max: (NSString *) max { DynamoDBQueryRequest *req = [[DynamoDBQueryRequest alloc] autorelease]; req.tableName = TABLE_NAME; ハッシュ req.limit = [[NSNumber alloc] initWithInt: NUMBER_OF_ITEMS_TO_GET_AT_ONCE]; キーを req.hashKeyValue = [[DynamoDBAttributeValue alloc] initWithS: hashKey] autorelease]; 指定 DynamoDBCondition *lessThanMax = [[DynamoDBCondition alloc] autorelease]; [req.rangeKeyCondition setComparisonOperator: @“LT"]; [req.rangeKeyCondition addAttributeValueList: [[[DynamoDBAttributeValue alloc] initWithN: max] autorelease]]; req.rangeKeyCondition = lessThanMax; 条件を 指定 クエリを DynamoDBQueryResponse *resp = [[AmazonClientManager dynamodb] query: req]; 実行 return resp; } © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 58. iOS  SDK利利⽤用時のTips !   UIスレッドからAWSのAPIを呼ぶのは避ける •  適宜NSOperationやGCD等を使⽤用 !   各サービスクライアントのインスタンスは再利利⽤用 •  サービスクライアントの実装はThread  Safe •  例例:サンプル内のAmazonClientManager #import  "AmazonClientManager.h" static  AmazonS3Client              *s3    =  nil; @implementation  AmazonClientManager +(AmazonS3Client  *)s3 {        if(s3  ==  nil)  s3    =  [[AmazonS3Client  alloc]  initWithCredentials:credentials];        return  s3; } !   ユースケース別の解説付きコードサンプルがこちらに: •  http://aws.amazon.com/articles/SDKs/iOS © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 59. AWS  SDK  FOR  JAVASCRIPT   IN  WEB  BROWSER © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 60. AWS  SDK  for  JavaScript  in  the   Browserとは !   Amazon提供のブラウザで動作するJavaScript環境 のためのAWS  SDK •  node.js環境のためのSDKは別に存在する !   公式ページ:http://aws.amazon.com/jp/sdkforbrowser/ !   環境: !   利利⽤用⽅方法 •  公式ページからダウンロード •  Gitレポジトリから © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 61. 操作可能サービス DynamoDB S3 SQS SNS © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 62. 初期設定(1/2) !   HTML内にJavaScriptを読み込む •  SDKをインターネット上の任意の場所に配置し、Scriptタグで 読み込む •  <script  type="text/javascript"  src=”PATH/TO/YOUR/ SDK"></script> •  AWSで⽤用意するCDN上に配置されたSDKを使う •  <script  type="text/javascript"  src="https:// sdk.amazonaws.com/js/aws-‐‑‒sdk-‐‑‒2.0.0-‐‑‒rc1.min.js"></ script> !   読み込まれると、“AWS”というグローバル変数が利利⽤用可 能になる © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 63. 初期設定(2/2) ! WebIdentityFederationでAWS  Credentialを取得 //  FacebookのAccessTokenを使ってAWSのCredentialを取得する window.fbAsyncInit  =  function()  {                FB.init({  appId:  appId  });                FB.login(function(response)  {                    AWS.config.credentials  =  new  AWS.WebIdentityCredentials({                        ProviderId:  'graph.facebook.com',                        RoleArn:  roleArn,        //  IAM  RoleのARN                        WebIdentityToken:  response.authResponse.accessToken                    });                    fbUserId  =  response.authResponse.userID;                    button.style.display  =  'block';                }); }; //  FacebookのSDK読み込み (function(d,  s,  id){        var  js,  fjs  =  d.getElementsByTagName(s)[0];        if  (d.getElementById(id))  {return;}        js  =  d.createElement(s);  js.id  =  id;        js.src  =  "//connect.facebook.net/en_̲US/all.js";        fjs.parentNode.insertBefore(js,  fjs); }(document,  'script',  'facebook-‐‑‒jssdk')); be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not
  • 64. コード例例:S3へのアップロード <input  type="file"  id="file-‐‑‒chooser"  /> <button  id="upload-‐‑‒button"  style="display:  none”>Upload  to  S3</button> <script  type="text/javascript”> //AWS.config.credentialにCredentialが取得済みの状態で var  bucket  =  new  AWS.S3({params:  {Bucket:  “YOUR_̲BUCKET_̲NAME”}}); button.addEventListener('click',  function()  {                var  file  =  fileChooser.files[0];                if  (file)  {                    results.innerHTML  =  '';                    var  objKey  =  “KEY_̲NAME”;                    var  params  =  {Key:  objKey,  Body:  file,  ACL:  'public-‐‑‒read'};                    bucket.putObject(params,  function  (err,  data)  {                        if  (err)  {                            console.log(err);                        }  else  {                            console.log(data);                        }                    });              } },  false); </script> © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 65. コード例例:DynamoDBへのputItem <button  id="upload-‐‑‒button"  style="display:  none">Put  to  DynamoDB</button> <script  type="text/javascript”> //AWS.config.credentialにCredentialが取得済みの状態で var  dynamodb  =  new  AWS.DynamoDB({region:'ap-‐‑‒northeast-‐‑‒1'}); button.addEventListener('click',  function()  {          var  params  =  {                      TableName:  'test',                                Item:  {                                        'title':  {S:  appId  +  'aaa'},                                        'message':  {S:  'Good  Morning'}                    }          };        dynamodb.putItem(params,  function(err,  data)  {                    if  (err)  {                                        console.log(err);                    }else{                                        console.log(data);                    }          }); },  false); </script> © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 66. まとめ © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 67. まとめ !   クライアント側SDKを⽤用いて2-‐‑‒tierアーキテクチャを実現 •  •  •  •  バックエンド側の開発コストを最⼩小化 バックエンド側の運⽤用コストを最⼩小化 スケーラビリティの⼼心配なし ⾦金金額⾯面でもコスト削減に !   Web  Identity  Federationや認証トークン機構を使うことで クライアントアプリからのAWSへのアクセスも安⼼心 !   AWSはコーディングする⽅方の⼒力力を最⼤大限に引き出すインフラ •  その恩恵はサーバ側だけでなくクライアントアプリにも! •  HAPPY  CODING!! © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 68. ご参加ありがとう ございました © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 69. TVM導⼊入の流流れ !   認証トークンに割り当てるユーザ権限を設定 •  Identity  and  Access  Management  (IAM)でユーザを作成 •  アプリケーションに合わせたポリシーを割り当て !   TVMを実装し、デプロイ •  サンプルはWARファイルをデプロイするだけで実⾏行行可 •  AnonymousTVM •  IdentityTVM àElasticBeanstalkを使うと簡単! !   TVMの各種設定 •  Security  Token  Serviceにアクセスするためのアクセスキー設定 •  SSLの設定(推奨) © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 70. 認証トークンに割り当てるユーザ権限を設定 (1/2) !   IAMでTVM⽤用の新しいユーザを作成(例例:TVMUser) !   認証情報(アクセスキー・シークレットキー)を保存 後でTVMアプリケーション側に設定するので大切に保存 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 71. 認証トークンに割り当てるユーザ権限を設定 (2/2) !   カスタムポリシーを作成して割り当て !   カスタムポリシーの例例  (TVMのサンプルに同梱) { "Statement": [ { "Effect": "Allow", "Action": "sts:GetFederationToken", "Resource": "*" }, { "Effect": "Allow", "Action": "iam:GetUser", "Resource": "*" }, { "Effect": "Allow", "Action": "sdb:*", "Resource": "*" }, { "Effect":"Allow", "Action":"dynamodb:*", "Resource":"*" }, { "Effect": "Allow", "Action": "sqs:*", "Resource": "*" }, { "Effect": "Allow", "Action": "s3:*", "Resource": "*" }, {"Effect": "Allow", "Action": "sns:*", "Resource": "*" } ] } アプリケーションで必要最小限な権限になるよう更新 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 72. TVMがデプロイされたことを確認 !   TVMをデプロイしたHTTPコンテナにアクセス 設定に関する警告が消え て、Security Token Serviceにアクセス出来る ようになったことを確認 本番ではSSL必須: 平文ではデバイス/ユーザ 登録で秘密鍵/パスワード が流出するリスク © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 73. [再掲]   認証トークンを⽤用いたサービス利利⽤用の流流れ Token Vending Machine (TVM)を導入 •  ユーザ/端末の認証とトークンの発行を実施 •  アプリケーションごとの認証とAWSの認証機構を結びつけるサービス 1.  Security Token Serviceか 1ら認証トークンを取得 STSから 2.  クライアントに認証トークン を提供 3.  クライアントは認証トークン を用いてAWSにアクセス 3 TVMのサンプル を利用 1 2 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 74. TVMを⽤用いたサンプルを試す AnonymousTVMの動作確認 !   samples/S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVM •  設定例例: •  TVM  URL:  http://anon-‐‑‒example.elasticbeanstalk.com Android: AwsCredentials.propertiesを編集 tokenVendingMachineURL=anon-example.elasticbeanstalk.com iOS: Constants.hを編集 #define TOKEN_VENDING_MACHINE_URL @“anon-example.elasticbeanstalk.com” /registerdevice?uid=<UID>&key=<KEY> /gettoken? uid=<UID>&timestamp=<timestamp>&signature=<Sig http://anonexample.elasticbeanstalk.com nature> <Encrypted token credentials> © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 75. TVMを⽤用いたサンプルを試す IdentityTVMの動作確認 !   samples/S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVMIdentity •  設定例例: •  TVM  URL:  http://id-‐‑‒example.elasticbeanstalk.com •  アプリ名:  exampleApp  (TVMの環境変数”PARAM1”に設定した値) Android: AwsCredentials.propertiesを編集 tokenVendingMachineURL=id-example.elasticbeanstalk.com appName=exampleApp iOS: Constants.hを編集 #define TOKEN_VENDING_MACHINE_URL @“id-example.elasticbeanstalk.com” #define APP_NAME @“exampleApp" login() registeruser() © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 76. TVM  Clientのインテグレーション !   Android  /  iOSともにTVM  Clientの実装がサンプルに •  各サンプル内のAmazonClientManagerの実装はTVM  Clientを利利⽤用 •  S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVM    à  Anonymous  TVM •  S3_̲SimpleDB_̲SNS_̲SQS_̲DemoTVMIdentity    à  IdentityTVM !   おすすめのステップは… 1.  ベースとするTVMの実装を決定  (Anonymous  or  Identity) 2.  対応するサンプルコード内の実装をコピー •  •  AmazonClientManager TVMClient 3.  必要に応じてTVM,  TVM  Client,  認証メカニズムをカスタマイズ •  Identity  TVMをカスタマイズすればSNSとのID連携も © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.