SlideShare uma empresa Scribd logo
1 de 74
Baixar para ler offline
AWSマイスターシリーズ
                                    Reloaded
                               AWS SDK for Android &
                                  AWS SDK for iOS

                                               2013.1.25
                                           ソリューションアーキテクト
                                             安川 健太    玉川 憲



© 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 オーバービュー
     モバイルアプリでのAWS活用法
     AWS SDK for Android
     AWS SDK for iOS
     モバイルアプリでの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 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 Android
                  •    AWS SDK for iOS
                  •    有志の方による実装(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.
動作イメージ

                                                                                                                                               起動、停止




                                                                                                                                               Put,Get
                                                        REST

      AWS SDK
                                                        SOAP
                                                                                                                                                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の認証キー(アクセスキー、シークレットキ-)
        • AWSログイン後、[アカウント]>[セキュリティ証明書]の画面
          から取得
        • IAMユーザーは、ManagementConsoleのIAMタブから取得




© 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活用法


© 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管理コンソールアプリの作成
                ノマドインフラ管理の促進!


            ユーザ間で共有する情報の保存先として
               • 写真や動画などを S3にアップロードしてユーザ間で共有
               • アプリ内の共有データをDynamoDBに
                ユーザ数が増えてもキャパシティの心配なし!

            メッセージング機構の実装に
               • SNSとSQSを組み合わせたメッセージ通知、ブロードキャスト
               • SESを使ったEmail送信
                プラットフォームを超えたメッセージングを独自サーバなしで!

       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.
モバイルSDKでAWSをバックエンドに

     AWS Android/iOS SDKを使えば…
        • 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.
AWSをバックエンドに使う例
      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.
AWSをバックエンドとして使う例
      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.
サーバ側のコーディングなしでアプリも
      awschat: 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.
awschatの動作:
                   チャットグループへのSubscribe
     過去メッセージはDynamoDBから取得
     SQSでキューを作成し、SNSにSubscribe

1. SQSのキューを作成
                                                                                  チャットグループの
                                                                                  SNSトピック
                             2. SNSトピックにSubscribe
                                                                                                               4. SNSトピックにPublish

                                   5. SQSを通じて通知

   クライアントA                                                                                                                                            クライアントB
                                         0. メッセージ
                                                                                                                   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.
awschatの動作:
     チャットグループへのファイルアップロード

     S3にファイルをアップロード
     SNSで通知
                                                                          チャットグループの
                                                                          SNSトピック

                                                                                                       3. SNSトピックにPublish

                            4. SQSを通じて通知
                                                                                                   2. メッセージ書き込み
クライアントA                                                                                                                                                クライアントB


            5. ファイルダウンロード                                                                                           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 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 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をバックエンドとして使えば

     モバイルアプリの開発に多くのメリット:
        •     バックエンド側の開発コストを最小化
        •     バックエンド側の運用コストを最小化
        •     スケーラビリティの心配なし
        •     金額面でもローコスト(当社比*)


     必要に応じて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 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.1 (API level 7)以上
        • 下記の機能はAndroid 2.2 (API level 8) 以上でサポート
                  • DynamoDB over SSL
                  • DynamoDB Mapper
     利用方法
        • 公式ページからダウンロード
        • 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に内包

     コードサンプル
        •     各種サービスの操作
        •     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
                                                                                                                                     DynamoDBMapperを
     配布時は必要なサービスのみ同梱                                                                                                                 使う場合に必要
     全部入り                                                                                          必要なサービスのみ
 aws-android-sdk-<version>.jar                                                                        aws-android-sdk-<version>-core.jar
 aws-android-sdk-<version>-ddb-mapper.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.
サンプルの起動

     AWSAndroidDemoの起動
        1.        samples/S3_SimpleDB_SNS_SQS_Demo
                  をインポート

        2. AWSの認証情報を設定(*)
                 •         AwsCredentials.propertiesを編集
                                    ACCESS_KEY_ID=CHANGE ME
                                    SECRET_KEY=CHANGE ME

                 •         (アクセスキーはここから取得可)
                                                                                                                                                     SDKライブラリは始めか

        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.
コード例
           基本的な流れ(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.
コード例:SNSにPublish
void publishMessage (String topicArn, String message){

                   PublishRequest pubReq = new PublishRequest();
                   pubReq.setMessage(message);
                   pubReq.setTopicArn(topicArn);
                   snsClient.publish(pubReq);
}

もちろんFluent Setterでも
void publishMessage (String topicArn, String message){

                   snsClient.publish(new PublishRequest()
                           .withTopicArn(topicArn)
                           .withMessage(message));
}



    © 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を定義                                                                              DynamoDBMapperを初期化
@DynamoDBTable(tableName = “meisters_items”)                                        AmazonDynamoDBClient dynamoClient =
public class MeistersItem {
                                                                                             new AmazonDynamoDBClient(getCredentials());
    private String id;                                                              AmazonDynamoDBMapper dbMapper =
    private long value;                                                                     new DynamoDBMapper(getDynamoClient());

    @DynamoDBHashKey(attributeName = “id”)
    public String getId() {
      return id;                                                                    POJOの保存
    }
                                                                                     MeisterItem item = new MeisterItem();
    @DynamoDBHashKey(attributeName = “id”)                                           item.setId(“Expensive item”);
    public void setId(String id) {                                                   item.setValue(10000);
      this.id = id;                                                                  dbMapper.save(item);
    }

    @DynamoDBAttribute(attributeName = “value”)                                      POJOの読み込み
    public long getValue() {
      return time;
    }
                                                                                     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;
                    }
               }
© 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つとして参照

      コードサンプル
        •      各種サービスの操作
        •      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.
サンプルの起動

     AWSiOSDemoの起動
        1.        samples/S3_SimpleDB_SNS_SQS_Demo/
                   AWSiOSDemo.xcodeproj をXcodeで開く

        2. AWSの認証情報を設定(*)
                 •         AWSiOSDemo/Classes/Constants.hを
                           編集
                                    ACCESS_KEY_ID=CHANGE ME
                                    SECRET_KEY=CHANGE ME

                 •         (アクセスキーはここから取得可)

        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.
コード例

         基本的な流れ (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;
   putObjectRequest.delegate = self;             Delegateとして途中経過や結果を受け
                                                                                           取れるように登録
    [[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.
コード例:SNSにPublish

- void publishMessage: (NSString*) topicArn
                                   message : (NSString *) message {
   SNSPublishRequest req =
        [[[SNSPublishRequest alloc] initWithTopicArn:topicArn
                                  andMessage: message] autorelease];

       [[AmazonClientManager sns] publish: 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.
コード例:CoreDataフレームワークで
     DynamoDBにオブジェクトを永続化 (1/2)
                                                                                                                                             フレームワーク追加
     AWSPersistent.frameworkを追加
     CoreDataフレームワークでデータモ
     デルを定義
     NSPersistentStoreCoordinator 設定
        • DynamoDBのテーブルに合わせて

ハッシュキーの指定
       NSDictionary *hashKeys = [NSDictionary                                                                                                  データモデル定義
       dictionaryWithObjectsAndKeys:
                    @"locationId", @"Location",
                    @"checkinId", @"Checkin", nil];

テーブルマッピングの指定(デフォルトではEntity名)
      NSDictionary *tableMapper = [NSDictionary
      dictionaryWithObjectsAndKeys:
                   @"AWS-Locations", @"Location",
                   @"AWS-Checkins", @"Checkin", nil];



© 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.
コード例:CoreDataフレームワークで
     DynamoDBにオブジェクトを永続化 (2/2)

     新規オブジェクトの作成と永続化
 Checkin *checkin = (Checkin *)[NSEntityDescription insertNewObjectForEntityForName:@"Checkin"
                                             inManagedObjectContext:managedObjectContext];
 checkin.checkinId = [Utilities getUUID];
 checkin.checkinTime = [NSDate date];
 checkin.comment = @"First Checkin";



     永続化済みオブジェクトの読み込み
 NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease];
 NSEntityDescription *entity = [NSEntityDescription entityForName:@"Location"
                                               inManagedObjectContext:managedObjectContext];
 [request setEntity:entity];
 NSArray *fetchedResults = [managedObjectContext executeFetchRequest:request error:&error];




© 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 Persistentフレームワークの注意点

     AWS Persistentフレームワークの制限
        • ハッシュキーに対応するプロパティ
                  • StringかNumericのみ
        • NSPredicatesに重要な制限
                  • 現状ハッシュキーのみ対応
                  • ハッシュキーで一度に指定できる値は一つだけ
                  • Predicateを使わないとScan操作になるためオーバヘッド大
                  現状複数のオブジェクトを一度に取得するユースケースに不向き
        • ハッシュキーに対応するプロパティに使えるのはStringかNumeric
          のみ
        • その他詳細は解説ページ参照

     リージョン選択は1.4.3以上でサポート
        • デフォルトはUS-east


© 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;
    }
© 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時間
         ただし延長・短縮は出来ない




© 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から                                                            3
2. クライアントに認証トークン
   を提供                                                                          アプリケーション
3. クライアントは認証トークン                                                                に合わせて任意
   を用いてAWSにアクセス                                                                 の実装が可能
                                                                                                                                  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.
Token Vending Machineの実装

     Amazonが公開している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

     Out-of-bandでユーザ登録 Facebook, Twitter,
                       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.
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のサンプルをデプロイ (1/2)

     ElasticBeanstalkでアプリケーションを作成




© 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のサンプルをデプロイ (2/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がデプロイされたことを確認

     TVMをデプロイしたHTTPコンテナにアクセス




                                                                                                                             まだTVMがSecurity Token
                                                                                                                             Serviceにアクセスするため
                                                                                                                             の認証情報を持っていない




© 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の設定




                                                                                                      TVMUserのアクセスキーを入力
                                                                                                      TVMUserのシークレットキーを入力


                                                                                       exampleApp                      任意のアプリ名を入力
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved.   May not be copied, modified or distributed in whole (Identity TVMの場合) of Amazon.com, Inc.
                                                                                                                       or in part without the express consent
TVMがデプロイされたことを確認

     TVMをデプロイしたHTTPコンテナにアクセス




                                                                                                                    本番ではSSL必須:
   設定に関する警告が消え                                                                                                     平文ではデバイス/ユーザ
     て、Security Token
                                                                                                                   登録で秘密鍵/パスワード
   Serviceにアクセス出来る
                                                                                                                     が流出するリスク
    ようになったことを確認

© 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から                                                            3
2. クライアントに認証トークン
   を提供
3. クライアントは認証トークン                                                                TVMのサンプル
   を用いてAWSにアクセス                                                                    を利用
                                                                                                                                  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>&sign
                                      ature=<Signature>                                                                                           http://anon-
                                                                                                                                                  example.elasticbeanstalk.com
                                                                       <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.
まとめ


© 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をアプリのバックエンドとして利用可
        •      バックエンド側の開発コストを最小化
        •      バックエンド側の運用コストを最小化
        •      スケーラビリティの心配なし
        •      金額面でもコスト削減に

      認証トークン機構を使うことでモバイルアプリからの
      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.
参考情報

     Amazonの提供するKindle Fire向けAPIもあります

            In-App Purchasing API
            アプリ内での課金をAmazon の1-Clickの仕組みを使って実現するAPI
            Get started with In-App Purchasing API



            Amazon GameCircle API
            ゲームに達成度やリーダーボード、Whispersyncなどを簡単に導入するためのAPI
            Get started with the Amazon GameCircle API



            Amazon Maps API
            インタラクティブなマップをアプリに組み込むためのAPI
            Get started with Amazon Maps API



© 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.

Mais conteúdo relacionado

Mais procurados

20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続
20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続
20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続Amazon Web Services Japan
 
多要素認証による Amazon WorkSpaces の利用
多要素認証による Amazon WorkSpaces の利用多要素認証による Amazon WorkSpaces の利用
多要素認証による Amazon WorkSpaces の利用Amazon Web Services Japan
 
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
AWS Black Belt Online Seminar 2017 Amazon ElastiCacheAWS Black Belt Online Seminar 2017 Amazon ElastiCache
AWS Black Belt Online Seminar 2017 Amazon ElastiCacheAmazon Web Services Japan
 
20200218 AWS Black Belt Online Seminar Next Generation Redshift
20200218 AWS Black Belt Online Seminar Next Generation Redshift20200218 AWS Black Belt Online Seminar Next Generation Redshift
20200218 AWS Black Belt Online Seminar Next Generation RedshiftAmazon Web Services Japan
 
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...Amazon Web Services Japan
 
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)NTT DATA Technology & Innovation
 
Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Web Services Japan
 
Ingress on Azure Kubernetes Service
Ingress on Azure Kubernetes ServiceIngress on Azure Kubernetes Service
Ingress on Azure Kubernetes ServiceToru Makabe
 
20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMR20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMRAmazon Web Services Japan
 
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法についてAzure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法についてShinya Yamaguchi
 
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-Amazon Web Services Japan
 
Day 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のこと
Day 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のことDay 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のこと
Day 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のことAmazon Web Services Japan
 
20190723 AWS Black Belt Online Seminar AWS CloudHSM
20190723 AWS Black Belt Online Seminar AWS CloudHSM 20190723 AWS Black Belt Online Seminar AWS CloudHSM
20190723 AWS Black Belt Online Seminar AWS CloudHSM Amazon Web Services Japan
 
20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems Manager20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems ManagerAmazon Web Services Japan
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティスAmazon Web Services Japan
 
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
20180322 AWS Black Belt Online Seminar AWS Snowball Edge20180322 AWS Black Belt Online Seminar AWS Snowball Edge
20180322 AWS Black Belt Online Seminar AWS Snowball EdgeAmazon Web Services Japan
 
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 Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS) AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS) Amazon Web Services Japan
 

Mais procurados (20)

20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続
20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続
20200219 AWS Black Belt Online Seminar オンプレミスとAWS間の冗長化接続
 
20211109 bleaの使い方(基本編)
20211109 bleaの使い方(基本編)20211109 bleaの使い方(基本編)
20211109 bleaの使い方(基本編)
 
多要素認証による Amazon WorkSpaces の利用
多要素認証による Amazon WorkSpaces の利用多要素認証による Amazon WorkSpaces の利用
多要素認証による Amazon WorkSpaces の利用
 
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
AWS Black Belt Online Seminar 2017 Amazon ElastiCacheAWS Black Belt Online Seminar 2017 Amazon ElastiCache
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
 
20200218 AWS Black Belt Online Seminar Next Generation Redshift
20200218 AWS Black Belt Online Seminar Next Generation Redshift20200218 AWS Black Belt Online Seminar Next Generation Redshift
20200218 AWS Black Belt Online Seminar Next Generation Redshift
 
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
 
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
IAM Roles Anywhereのない世界とある世界(2022年のAWSアップデートを振り返ろう ~Season 4~ 発表資料)
 
Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身
 
Ingress on Azure Kubernetes Service
Ingress on Azure Kubernetes ServiceIngress on Azure Kubernetes Service
Ingress on Azure Kubernetes Service
 
20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMR20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMR
 
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法についてAzure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
Azure AD とアプリケーションを SAML 連携する際に陥る事例と対処方法について
 
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
 
Day 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のこと
Day 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のことDay 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のこと
Day 1 with Amazon Web Services - AWSご利用開始時に最低限おさえておきたい10のこと
 
20190723 AWS Black Belt Online Seminar AWS CloudHSM
20190723 AWS Black Belt Online Seminar AWS CloudHSM 20190723 AWS Black Belt Online Seminar AWS CloudHSM
20190723 AWS Black Belt Online Seminar AWS CloudHSM
 
20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems Manager20200212 AWS Black Belt Online Seminar AWS Systems Manager
20200212 AWS Black Belt Online Seminar AWS Systems Manager
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
 
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
20180322 AWS Black Belt Online Seminar AWS Snowball Edge20180322 AWS Black Belt Online Seminar AWS Snowball Edge
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
 
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
 
Black Belt Online Seminar AWS Amazon S3
Black Belt Online Seminar AWS Amazon S3Black Belt Online Seminar AWS Amazon S3
Black Belt Online Seminar AWS Amazon S3
 
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS) AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
 

Semelhante a 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-Amazon Web Services Japan
 
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-Amazon Web Services Japan
 
JAWS-UG鹿児島 初心者向け簡単講座
JAWS-UG鹿児島 初心者向け簡単講座JAWS-UG鹿児島 初心者向け簡単講座
JAWS-UG鹿児島 初心者向け簡単講座Serverworks Co.,Ltd.
 
これでAWSマスター!? 初心者向けAWS簡単講座
これでAWSマスター!? 初心者向けAWS簡単講座これでAWSマスター!? 初心者向けAWS簡単講座
これでAWSマスター!? 初心者向けAWS簡単講座Serverworks Co.,Ltd.
 
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャ
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャNoSQL on AWSで作る最新ソーシャルゲームアーキテクチャ
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャYasuhiro Matsuo
 
JAWS熊本で使用したSWX社内用AWS初心者向け資料
JAWS熊本で使用したSWX社内用AWS初心者向け資料JAWS熊本で使用したSWX社内用AWS初心者向け資料
JAWS熊本で使用したSWX社内用AWS初心者向け資料Aya Komuro
 
JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料
JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料
JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料Serverworks Co.,Ltd.
 
[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ
[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ
[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップAmazon Web Services Japan
 
Awsではじめるgluster fs 20120726-public
Awsではじめるgluster fs 20120726-publicAwsではじめるgluster fs 20120726-public
Awsではじめるgluster fs 20120726-publicAkio Katayama
 
アマゾンクラウドの真価
アマゾンクラウドの真価アマゾンクラウドの真価
アマゾンクラウドの真価kaminashi
 
AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう
AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めようAWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう
AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めようAmazon Web Services Japan
 
[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormation[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormationAmazon Web Services Japan
 
[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-
[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-
[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-Amazon Web Services Japan
 
[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マイスターシリーズ]Amazon Relational Database Service (RDS)
[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)
[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)Amazon Web Services Japan
 
いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2Yasuhiro Matsuo
 
Amazon EC2を使った実践SaaS運用事例
Amazon EC2を使った実践SaaS運用事例Amazon EC2を使った実践SaaS運用事例
Amazon EC2を使った実践SaaS運用事例Yuuki Namikawa
 

Semelhante a AWS SDK for Android and iOS (20)

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マイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-
 
JAWS-UG鹿児島 初心者向け簡単講座
JAWS-UG鹿児島 初心者向け簡単講座JAWS-UG鹿児島 初心者向け簡単講座
JAWS-UG鹿児島 初心者向け簡単講座
 
これでAWSマスター!? 初心者向けAWS簡単講座
これでAWSマスター!? 初心者向けAWS簡単講座これでAWSマスター!? 初心者向けAWS簡単講座
これでAWSマスター!? 初心者向けAWS簡単講座
 
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャ
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャNoSQL on AWSで作る最新ソーシャルゲームアーキテクチャ
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャ
 
JAWS熊本で使用したSWX社内用AWS初心者向け資料
JAWS熊本で使用したSWX社内用AWS初心者向け資料JAWS熊本で使用したSWX社内用AWS初心者向け資料
JAWS熊本で使用したSWX社内用AWS初心者向け資料
 
JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料
JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料
JAWSUG熊本で開催されたハンズオンにて発表したAWS初心者向け資料
 
[AWSマイスターシリーズ] Amazon VPC
[AWSマイスターシリーズ] Amazon VPC[AWSマイスターシリーズ] Amazon VPC
[AWSマイスターシリーズ] Amazon VPC
 
[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ
[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ
[AWS Summit 2012] ソリューションセッション#2 リーンクラウドでいこう! クラウドで実現するリーンスタートアップ
 
Awsではじめるgluster fs 20120726-public
Awsではじめるgluster fs 20120726-publicAwsではじめるgluster fs 20120726-public
Awsではじめるgluster fs 20120726-public
 
アマゾンクラウドの真価
アマゾンクラウドの真価アマゾンクラウドの真価
アマゾンクラウドの真価
 
AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう
AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めようAWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう
AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう
 
[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormation[AWSマイスターシリーズ] AWS CloudFormation
[AWSマイスターシリーズ] AWS CloudFormation
 
[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-
[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-
[AWSマイスターシリーズ] AWS Elastic Beanstalk -Python編-
 
[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マイスターシリーズ]Amazon Relational Database Service (RDS)
[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)
[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)
 
いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2いまさら聞けない Amazon EC2
いまさら聞けない Amazon EC2
 
AWS Black Belt Techシリーズ AWS SDK
AWS Black Belt Techシリーズ AWS SDKAWS Black Belt Techシリーズ AWS SDK
AWS Black Belt Techシリーズ AWS SDK
 
Amazon EC2を使った実践SaaS運用事例
Amazon EC2を使った実践SaaS運用事例Amazon EC2を使った実践SaaS運用事例
Amazon EC2を使った実践SaaS運用事例
 
Amazon VPCトレーニング-VPCの説明
Amazon VPCトレーニング-VPCの説明Amazon VPCトレーニング-VPCの説明
Amazon VPCトレーニング-VPCの説明
 

Mais de 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
 
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
 
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
 
[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
 

Mais de 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 ゲーム業界向け機械学習最新状況アップデート
 
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ダッシュボードを最速で用意するために
 
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開発⼊⾨
 
[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 ...
 

Último

NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NTT DATA Technology & Innovation
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルCRI Japan, Inc.
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイスCRI Japan, Inc.
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Hiroshi Tomioka
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)Hiroshi Tomioka
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video UnderstandingToru Tamaki
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Gamesatsushi061452
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...Toru Tamaki
 

Último (11)

NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 

AWS SDK for Android and iOS

  • 1. AWSマイスターシリーズ Reloaded AWS SDK for Android & AWS SDK for iOS 2013.1.25 ソリューションアーキテクト 安川 健太 玉川 憲 © 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 オーバービュー モバイルアプリでのAWS活用法 AWS SDK for Android AWS SDK for iOS モバイルアプリでの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.
  • 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 Android • AWS SDK for iOS • 有志の方による実装(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. 動作イメージ 起動、停止 Put,Get REST AWS SDK SOAP 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.
  • 8. 認証情報 AWSの認証キー(アクセスキー、シークレットキ-) • AWSログイン後、[アカウント]>[セキュリティ証明書]の画面 から取得 • IAMユーザーは、ManagementConsoleのIAMタブから取得 © 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. でもモバイルアプリの役に立つの? © 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活用法 © 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.
  • 11. モバイルアプリでのAWS SDK活用法 AWS管理コンソールアプリの作成  ノマドインフラ管理の促進! ユーザ間で共有する情報の保存先として • 写真や動画などを S3にアップロードしてユーザ間で共有 • アプリ内の共有データをDynamoDBに  ユーザ数が増えてもキャパシティの心配なし! メッセージング機構の実装に • SNSとSQSを組み合わせたメッセージ通知、ブロードキャスト • SESを使ったEmail送信  プラットフォームを超えたメッセージングを独自サーバなしで! 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. モバイルSDKでAWSをバックエンドに AWS Android/iOS SDKを使えば… • 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.
  • 13. AWSをバックエンドに使う例 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. AWSをバックエンドとして使う例 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. サーバ側のコーディングなしでアプリも awschat: 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.
  • 16. awschatの動作: チャットグループへのSubscribe 過去メッセージはDynamoDBから取得 SQSでキューを作成し、SNSにSubscribe 1. SQSのキューを作成 チャットグループの SNSトピック 2. SNSトピックにSubscribe 4. SNSトピックにPublish 5. SQSを通じて通知 クライアントA クライアントB 0. メッセージ 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.
  • 17. awschatの動作: チャットグループへのファイルアップロード S3にファイルをアップロード SNSで通知 チャットグループの SNSトピック 3. SNSトピックにPublish 4. SQSを通じて通知 2. メッセージ書き込み クライアントA クライアントB 5. ファイルダウンロード 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.
  • 18. その他の例 非同期バッチ処理 非同期バッチ処理要求を直接登録 • 通常のWebアプリ等 Job queue Client Workers Web Frontend • Android/iOS 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.
  • 19. その他の例 ログやイベント情報の集計処理 ログやイベント情報を直接登録 • 通常のWebアプリ等 Client Web Frontend ログ・イベント集計 • Android/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.
  • 20. SDKでAWSをバックエンドとして使えば モバイルアプリの開発に多くのメリット: • バックエンド側の開発コストを最小化 • バックエンド側の運用コストを最小化 • スケーラビリティの心配なし • 金額面でもローコスト(当社比*) 必要に応じて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 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.
  • 22. AWS SDK for Androidとは Amazon提供のAWS開発用のAndroid向けSDK 公式ページ:http://aws.amazon.com/jp/sdkforandroid/ 環境:Android 2.1 (API level 7)以上 • 下記の機能はAndroid 2.2 (API level 8) 以上でサポート • DynamoDB over SSL • DynamoDB Mapper 利用方法 • 公式ページからダウンロード • 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.
  • 23. 操作可能サービス 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.
  • 24. SDKに含まれるもの AWS Android ライブラリ • 各種サービス向けAPIを提供するJavaライブラリ • Androidアプリのプロジェクトから参照 • 最終的にはAPKに内包 コードサンプル • 各種サービスの操作 • 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.
  • 25. 初期設定 プロジェクトの依存関係に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.
  • 26. 依存するJarファイルについてTips 開発時はデバッグシンボル付きのライブラリを使用 aws-android-sdk-<version>-debug.jar aws-android-sdk-<version>-ddb-mapper-debug.jar DynamoDBMapperを 配布時は必要なサービスのみ同梱 使う場合に必要 全部入り 必要なサービスのみ aws-android-sdk-<version>.jar aws-android-sdk-<version>-core.jar aws-android-sdk-<version>-ddb-mapper.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.
  • 27. サンプルの起動 AWSAndroidDemoの起動 1. samples/S3_SimpleDB_SNS_SQS_Demo をインポート 2. AWSの認証情報を設定(*) • AwsCredentials.propertiesを編集 ACCESS_KEY_ID=CHANGE ME SECRET_KEY=CHANGE ME • (アクセスキーはここから取得可) SDKライブラリは始めか 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.
  • 28. コード例 基本的な流れ(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.
  • 29. コード例: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.
  • 30. コード例: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.
  • 31. コード例:SNSにPublish void publishMessage (String topicArn, String message){ PublishRequest pubReq = new PublishRequest(); pubReq.setMessage(message); pubReq.setTopicArn(topicArn); snsClient.publish(pubReq); } もちろんFluent Setterでも void publishMessage (String topicArn, String message){ snsClient.publish(new PublishRequest() .withTopicArn(topicArn) .withMessage(message)); } © 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. コード例:DynamoDBMapperで DynamoDBにオブジェクトを永続化 POJOを定義 DynamoDBMapperを初期化 @DynamoDBTable(tableName = “meisters_items”) AmazonDynamoDBClient dynamoClient = public class MeistersItem { new AmazonDynamoDBClient(getCredentials()); private String id; AmazonDynamoDBMapper dbMapper = private long value; new DynamoDBMapper(getDynamoClient()); @DynamoDBHashKey(attributeName = “id”) public String getId() { return id; POJOの保存 } MeisterItem item = new MeisterItem(); @DynamoDBHashKey(attributeName = “id”) item.setId(“Expensive item”); public void setId(String id) { item.setValue(10000); this.id = id; dbMapper.save(item); } @DynamoDBAttribute(attributeName = “value”) POJOの読み込み public long getValue() { return time; } 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.
  • 33. 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; } } © 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. 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.
  • 35. 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.
  • 36. 操作可能サービス 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.
  • 37. SDKに含まれるもの AWS iOSライブラリ • 各種サービス向けAPIを提供するObjective-Cライブラリ • iOSアプリプロジェクトのフレームワークの1つとして参照 コードサンプル • 各種サービスの操作 • 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.
  • 38. 初期設定 ~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.
  • 39. 初期設定 ~ドキュメントのインストール~ ドキュメントセットを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.
  • 40. サンプルの起動 AWSiOSDemoの起動 1. samples/S3_SimpleDB_SNS_SQS_Demo/ AWSiOSDemo.xcodeproj をXcodeで開く 2. AWSの認証情報を設定(*) • AWSiOSDemo/Classes/Constants.hを 編集 ACCESS_KEY_ID=CHANGE ME SECRET_KEY=CHANGE ME • (アクセスキーはここから取得可) 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.
  • 41. コード例 基本的な流れ (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.
  • 42. コード例: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; putObjectRequest.delegate = self; Delegateとして途中経過や結果を受け 取れるように登録 [[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.
  • 43. コード例: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.
  • 44. コード例: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.
  • 45. コード例:SNSにPublish - void publishMessage: (NSString*) topicArn message : (NSString *) message { SNSPublishRequest req = [[[SNSPublishRequest alloc] initWithTopicArn:topicArn andMessage: message] autorelease]; [[AmazonClientManager sns] publish: 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.
  • 46. コード例:CoreDataフレームワークで DynamoDBにオブジェクトを永続化 (1/2) フレームワーク追加 AWSPersistent.frameworkを追加 CoreDataフレームワークでデータモ デルを定義 NSPersistentStoreCoordinator 設定 • DynamoDBのテーブルに合わせて ハッシュキーの指定 NSDictionary *hashKeys = [NSDictionary データモデル定義 dictionaryWithObjectsAndKeys: @"locationId", @"Location", @"checkinId", @"Checkin", nil]; テーブルマッピングの指定(デフォルトではEntity名) NSDictionary *tableMapper = [NSDictionary dictionaryWithObjectsAndKeys: @"AWS-Locations", @"Location", @"AWS-Checkins", @"Checkin", nil]; © 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. コード例:CoreDataフレームワークで DynamoDBにオブジェクトを永続化 (2/2) 新規オブジェクトの作成と永続化 Checkin *checkin = (Checkin *)[NSEntityDescription insertNewObjectForEntityForName:@"Checkin" inManagedObjectContext:managedObjectContext]; checkin.checkinId = [Utilities getUUID]; checkin.checkinTime = [NSDate date]; checkin.comment = @"First Checkin"; 永続化済みオブジェクトの読み込み NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Location" inManagedObjectContext:managedObjectContext]; [request setEntity:entity]; NSArray *fetchedResults = [managedObjectContext executeFetchRequest:request error:&error]; © 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 Persistentフレームワークの注意点 AWS Persistentフレームワークの制限 • ハッシュキーに対応するプロパティ • StringかNumericのみ • NSPredicatesに重要な制限 • 現状ハッシュキーのみ対応 • ハッシュキーで一度に指定できる値は一つだけ • Predicateを使わないとScan操作になるためオーバヘッド大 現状複数のオブジェクトを一度に取得するユースケースに不向き • ハッシュキーに対応するプロパティに使えるのはStringかNumeric のみ • その他詳細は解説ページ参照 リージョン選択は1.4.3以上でサポート • デフォルトはUS-east © 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. 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; } © 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. 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.
  • 51. 誰の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.
  • 52. 開発者アカウントを使うとして… アプリに開発者アカウントのアクセスキー等を埋め込ん だら • アクセスキーが広範にばら撒かれることに • アクセスキーの不正利用を止めるためにキーを無効化したら 全ユーザへのサービスが停止!! アクセスキーの定期的な更新で対処するにしても • 更新のたびにバージョンアップは非現実的 • 更新前のアプリからはサービス利用不可に © 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. セキュアな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.
  • 54. Security Token Service AWSに対する、一時的な認証情報を作成する仕組み • 期限付きの認証情報(認証チケット)を発行 • Identity and Access Management (IAM)サービスの機能 ユーザーに対して、以下の3つのキーを発行  アクセスID  シークレットキー  セッショントークン 作成した認証情報の有効期限設定が可能  デフォルト12時間 最小1時間 最大36時間  ただし延長・短縮は出来ない © 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. 認証トークンを用いたサービス利用の流れ Token Vending Machine (TVM)を導入 • ユーザ/端末の認証とトークンの発行を実施 • アプリケーションごとの認証とAWSの認証機構を結びつけるサービス 1. Security Token Service 1から認証トークンを取得 STSから 3 2. クライアントに認証トークン を提供 アプリケーション 3. クライアントは認証トークン に合わせて任意 を用いてAWSにアクセス の実装が可能 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.
  • 56. Token Vending Machineの実装 Amazonが公開している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.
  • 57. 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.
  • 58. Identity TVM Out-of-bandでユーザ登録 Facebook, Twitter, 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.
  • 59. 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.
  • 60. 認証トークンに割り当てるユーザ権限を設定 (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.
  • 61. 認証トークンに割り当てるユーザ権限を設定 (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.
  • 62. TVMのサンプルをデプロイ (1/2) ElasticBeanstalkでアプリケーションを作成 © 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. TVMのサンプルをデプロイ (2/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.
  • 64. TVMがデプロイされたことを確認 TVMをデプロイしたHTTPコンテナにアクセス まだTVMがSecurity Token Serviceにアクセスするため の認証情報を持っていない © 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. TVMの設定 TVMUserのアクセスキーを入力 TVMUserのシークレットキーを入力 exampleApp 任意のアプリ名を入力 © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole (Identity TVMの場合) of Amazon.com, Inc. or in part without the express consent
  • 66. TVMがデプロイされたことを確認 TVMをデプロイしたHTTPコンテナにアクセス 本番ではSSL必須: 設定に関する警告が消え 平文ではデバイス/ユーザ て、Security Token 登録で秘密鍵/パスワード Serviceにアクセス出来る が流出するリスク ようになったことを確認 © 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. [再掲] 認証トークンを用いたサービス利用の流れ Token Vending Machine (TVM)を導入 • ユーザ/端末の認証とトークンの発行を実施 • アプリケーションごとの認証とAWSの認証機構を結びつけるサービス 1. Security Token Service 1から認証トークンを取得 STSから 3 2. クライアントに認証トークン を提供 3. クライアントは認証トークン TVMのサンプル を用いてAWSにアクセス を利用 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.
  • 68. 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>&sign ature=<Signature> http://anon- example.elasticbeanstalk.com <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.
  • 69. 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.
  • 70. 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.
  • 71. まとめ © 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. まとめ SDKを使うことでAWSをアプリのバックエンドとして利用可 • バックエンド側の開発コストを最小化 • バックエンド側の運用コストを最小化 • スケーラビリティの心配なし • 金額面でもコスト削減に 認証トークン機構を使うことでモバイルアプリからの 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.
  • 73. 参考情報 Amazonの提供するKindle Fire向けAPIもあります In-App Purchasing API アプリ内での課金をAmazon の1-Clickの仕組みを使って実現するAPI Get started with In-App Purchasing API Amazon GameCircle API ゲームに達成度やリーダーボード、Whispersyncなどを簡単に導入するためのAPI Get started with the Amazon GameCircle API Amazon Maps API インタラクティブなマップをアプリに組み込むためのAPI Get started with Amazon Maps API © 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. ご参加ありがとう ございました © 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.