[awsマイスターシリーズ] aws client side sdk -android,ios & javascript-

76
© 2012 Amazon.com, Inc. and its 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 Clientside SDK Android, iOS and Javascript 2014.2.5 ソリューションアーキテクト 安川 健太 今井 雄太 re:Generate

Upload: amazon-web-services-japan

Post on 26-Jan-2015

118 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

  • 1. re:G ene rateAWS AWS Client-side SDK- Android, iOS and Javascript - 2014.2.5 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

2. Agenda ! AWS SDK ! SDK ! SDKAWS Credentials ! SDK AWS SDK for Android AWS SDK for iOS AWS SDK for JavaScript in the Browser! 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 3. AWS SDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 4. AWS AWS Management ConsoleAWS 2012 Amazon.com, Inc. and its 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 GUICUI 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 ! AWSSDK AWS SDK for Java AWS SDK for .Net AWS SDK for Ruby AWS SDK for PHP AWS SDK for Python (boto) AWS SDK for node.js AWS SDK for Android AWS SDK for iOS AWS SDK for Javascript in Browser ActionScript HTTPS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 7. SDK REST AWS SDKSOAPPut,GetDB 2012 Amazon.com, Inc. and its 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 SDK JavanodeJS.NETPHPPythonRubyAndroidiOSJavascript in BrowserSDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 9. SDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 10. AWS 2-tier ! AWS AWS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 11. 1 ! DynamoDBS3HTML +JSS3Web HTML+JShttps://s3.amazonaws.com/aws.mattgy.net/dynamodb-d3/index.html 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 12. 2: ! AWS / DynamoDB Simple Notication Service (SNS) Simple Queue Service (SQS) SNS Simple Storage Service (S3) 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 13. 2: ! DynamoDB, S32. DB / DynamoDB 1. DB / 3. DB / S3 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 14. 2: ! SNSSQSPub/SubSNS: Simple Notication Service SQS: Simple Queue Service+ SNS topicSQS queue2. Notify 1. Publish 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 15. 2: Subscribe ! DynamoDB ! SQSSNSSubscribe 1. SQS SNS2. SNSSubscribe4. SNSPublish5. SQS A0. B 3. 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 16. 2: ! S3 ! SNS SNS 3. SNSPublish4. SQS A 5. 2. B 1. 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 17. ! WebJob queue ClientWorkersWeb Frontend Android/iOS/Javascript SDKJob queue Workers 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 18. ! WebClientWeb Frontend Android/iOS/Javascript SDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 19. Amazon SNS Apple DevicesGoogle Devices 3. 2. Amazon Kindle Fire Devices PushAmazon SNS Mobile Push 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 20. SDK ! *! EC2 * EC2 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 21. AWS CREDENTIALS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 22. AWS ! AWS AWSAWSOK! AWS AWS AWS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 23. ! ! 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 24. AWS ! ! /Credentials ! Credentials 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 25. Security Token Service ! AWS Identity and Access Management (IAM)! 3 ID ! 136 STS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 26. STS {Facebook, Google, Amazon} IDYesWeb Identity FederationYesIdentity TVM No Token Vending Machine (TVM) No Anonymous TVM 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 27. Web Identity Federation ! Web Identity ProviderAWS ! IAM RoleAssume Web Identity ProviderIAM Role Assume! Identity Provider Facebook Google Amazon 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 28. Web Identity FederationSTS Token Vending Machine (TVM) IAM http://www.slideshare.net/AmazonWebServicesJapan/20130716-aws-meisterregenerateiampublic 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 29. Web Identity Federation ! Android WebIdentityFederationSessionCredentialsProvider wif = new WebIdentityFederationSessionCredentialsProvider(fbSession.getAccessToken(), "graph.facebook.com", ROLE_ARN); String subjectFromWIF = wif.getSubjectFromWIF(); s3 = new AmazonS3Client(wif);!iOS AmazonWIFCredentialsProvider *wif = [[AmazonWIFCredentialsProvider alloc] initWithRole:ROLE_ARN andWebIdentityToken:self.session.accessTokenData.accessToken fromProvider:@"graph.facebook.com"]; NSString *subjectFromWIF = wif.subjectFromWIF; s3 = [[[AmazonS3Client alloc] autorelease] initWithCredentialsProvider:wif]; 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 30. Token Vending Machine (TVM) / STS1. Security Token Service 1 STS 2. 3. AWS3 12 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 31. TVM ! AnonymousTVM ! IdentityTVM 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 32. Anonymous TVM ! IDTVM ! 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. 33. Identity TVM ! ! ! ! Facebook, Twitter, Out-of-band LDAPAD 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. 34. Web Identity Fine Grained Access Control ! 1: S3 { "Version":"2012-10-17", "Statement":[ { "Eect":"Allow", "Action":["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], "Resource":[ "arn:aws:s3:::myBucket/myApp/${graph.facebook.com:id}", "arn:aws:s3:::myBucket/myApp/${graph.facebook.com:id}/* ] } ] Facebook } ID 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 35. Web Identity Fine Grained Access Control ! 2: DynamoDB /"Condition": { "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": [ "${www.amazon.com:user_id}" ], "dynamodb:Attributes": [ "UserId,"GameTitle, "Wins, "Losses ] }, "StringEqualsIfExists": { "dynamodb:Select": "SPECIFIC_ATTRIBUTES" } } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 36. SDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 37. AWS SDK FOR ANDROID 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 38. AWS SDK for Android ! AmazonAWSAndroidSDK ! http://aws.amazon.com/jp/sdkforandroid/ ! Android 2.3 (API level 10 ! GitMaven MavenLocal 2012 Amazon.com, Inc. and its 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. EC2S3DynamoDBSimpleDBSNSSQSSESELBCloudWatchAutoscaling iOS SDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 40. SDK ! AWS Android APIJava Android APK! ! Git https://github.com/awslabs/aws-sdk-android-samples SNSSQS S3 SimpleDB SES DynamoDB 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 41. ! Android SDK EclipseAndroid SDK libs APK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 42. JarTips ! aws-android-sdk--debug.jar aws-android-sdk--ddb-mapper-debug.jar! aws-android-sdk-.jar aws-android-sdk--ddb-mapper.jarDynamoDBMapper aws-android-sdk--core.jar aws-android-sdk--ddb.jar aws-android-sdk--s3.jar aws-android-sdk--sns.jar aws-android-sdk--sqs.jarproguard 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 43. ! iOS S3 void uploadToS3 (String bucketName, String objectName, File le){ AmazonCredentials credentials = new BasicAmazonCredentials(ACCESS_KEY, SECRET_KEY); AmazonS3Client s3 = new AmazonS3Client(credentials); PutObjectRequest req = new PutObjectRequest(bucketName, objectName, le)); PutObjectResponse resp = s3.putObject(req); } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 44. S3 () S3UploadTask uploadTask = new S3UploadTask(); uploadTask.execute(new PutObjectRequest(bucketName, objectName, tempFile)); private class S3UploadTask extends AsyncTask implements ProgressListener { protected Long totalSent; // AsyncTask#doInBackground() protected Long doInBackground (PutObjectRequest... reqs) {totalSent = 0L;reqs[0].setProgressListener(this); S3.getInstance().putObject(reqs[0]); return totalSent; } // ProgressListener#progressChanged() public void progressChanged (ProgressEvent progressEvent) { totalSent += progressEvent.getBytesTransfered(); publishProgress(totalSent); } } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 45. DynamoDBQuery Max QueryResult doQuery (String hashKey, String max) { AttributeValue hashKey = new AttributeValue().withS(hashKey); Condition lessThanMax = new Condition() .withComparisonOperator(ComparisonOperator.LT) .withAttributeValueList(new AttributeValue().withN(max)); QueryResult result = dynamoClient.query(new QueryRequest() .withTableName(TABLE_NAME) .withLimit(NUMBER_OF_ITEMS_TO_GET_AT_ONCE) .withHashKeyValue(hashKey) .withRangeKeyCondition(lessThanMax) ); return result; } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 46. DynamoDBMapper DynamoDBPOJO@DynamoDBTable(tableName = meisters_items) public class MeistersItem { private String id; private long value; @DynamoDBHashKey(attributeName = id) public String getId() { return id; } @DynamoDBHashKey(attributeName = id) public void setId(String id) { this.id = id; } @DynamoDBAttribute(attributeName = value) public long getValue() { return time; }}DynamoDBMapperAmazonDynamoDBClient dynamoClient = new AmazonDynamoDBClient(getCredentials()); AmazonDynamoDBMapper dbMapper = new DynamoDBMapper(getDynamoClient());POJO MeisterItem item = new MeisterItem(); item.setId(Expensive item); item.setValue(10000); dbMapper.save(item);POJO MeisterItem item = dbMapper.load(MeisterItem.class, Expensive item);@DynamoDBAttribute(attributeName = value) public void setValue(long time) { this.time = time; } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 47. Android SDKTips ! UIAWSAPI AsyncTaskThread! Thread Safe Singleton AmazonClientManager public class AmazonClientManager { // private AmazonS3Client s3Client = null; public AmazonS3Client s3() { if (s3Client == null) s3Client = new AmazonS3Client( credentials ); return s3Client; }}! http://aws.amazon.com/articles/SDKs/Android 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 48. AWS SDK FOR IOS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 49. AWS SDK for iOS ! AmazonAWSiOS SDK ! http://aws.amazon.com/jp/sdkforios/ ! iOS 4.3 ! Xcode v4 ! Git 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 50. EC2S3DynamoDBSimpleDBSNSSQSSESELBCloudWatchAutoscaling Android SDK 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 51. SDK ! AWS iOS APIObjective-C iOS1! ! Git https://github.com/awslabs/aws-sdk-ios-samples SNSSQS S3 SimpleDB SES DynamoDB DynamoDB CoreData 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 52. Framework ! SDK1. Xcode 2. Frameworks GroupCtrl 3. AWSiOSSDK.framework AWSPersistence.framework DynamoDB + CoreData Persistence4. #import #import #import #import 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 53. ! Xcode SDKdocset 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/DocSetsXcode 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 54. ! Android S3 - void uploadToS3: (NSString*) bucketName keyName: (NSString *) keyName leName: (NSString *) leName { S3PutObjectRequest *putObjectRequest = [[[S3PutObjectRequest alloc] initWithKey:keyName inBucket:bucketName] autorelease]; putObjectRequest.lename = leName; [[AmazonClientManager s3] putObject:putObjectRequest]; } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 55. S3 1/2 NSOperationS3 Uploader #import #import @interface AsyncImageUploader:NSOperation { - (void) start { . // Puts the file as an object in the bucket. S3PutObjectRequest *putObjectRequest = [[[S3PutObjectRequest alloc] initWithKey:keyName inBucket:bucketName] autorelease]; putObjectRequest.filename = filename; Delegate putObjectRequest.delegate = self;[[AmazonClientManager s3] putObject:putObjectRequest]; } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 56. S3 2/2 Delegate -(void) request:(AmazonServiceRequest *)request didCompleteWithResponse:(AmazonServiceResponse *)response { [self performSelectorOnMainThread:@selector(hideProgressView) withObject:nil waitUntilDone:NO]; [self finish]; } -(void) request:(AmazonServiceRequest *)request didSendData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger) totalBytesWritten totalBytesExpectedToWrite:(NSInteger) totalBytesExpectedToWrite { [self performSelectorOnMainThread:@selector(updateProgressView:) withObject: [NSNumber numberWithFloat: (float)totalBytesWritten / totalBytesExpectedToWrite] waitUntilDone:NO]; } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 57. DynamoDBQuery -(DynamoDynamoDBQueryResponse *) doQuery: (NSString*) hashKey max: (NSString *) max { DynamoDBQueryRequest *req = [[DynamoDBQueryRequest alloc] autorelease]; req.tableName = TABLE_NAME; req.limit = [[NSNumber alloc] initWithInt: NUMBER_OF_ITEMS_TO_GET_AT_ONCE]; req.hashKeyValue = [[DynamoDBAttributeValue alloc] initWithS: hashKey] autorelease];DynamoDBCondition *lessThanMax = [[DynamoDBCondition alloc] autorelease]; [req.rangeKeyCondition setComparisonOperator: @LT"]; [req.rangeKeyCondition addAttributeValueList: [[[DynamoDBAttributeValue alloc] initWithN: max] autorelease]]; req.rangeKeyCondition = lessThanMax; DynamoDBQueryResponse *resp = [[AmazonClientManager dynamodb] query: req]; return resp;} 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 58. iOS SDKTips ! UIAWSAPI NSOperationGCD! Thread Safe AmazonClientManager #import "AmazonClientManager.h" static AmazonS3Client *s3 = nil; @implementation AmazonClientManager +(AmazonS3Client *)s3 { if(s3 == nil) s3 = [[AmazonS3Client alloc] initWithCredentials:credentials]; return s3; }! http://aws.amazon.com/articles/SDKs/iOS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 59. AWS SDK FOR JAVASCRIPT IN WEB BROWSER 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 60. AWS SDK for JavaScript in the Browser ! AmazonJavaScript AWS SDK node.jsSDK! http://aws.amazon.com/jp/sdkforbrowser/ ! ! Git 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 61. DynamoDBS3SQSSNS 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 62. (1/2) ! HTMLJavaScript SDKScript AWSCDNSDK 2012 Amazon.com, Inc. and its 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. DynamoDBputItem Put to 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. 66. 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 67. ! SDK2-tier ! Web Identity Federation AWS ! AWS HAPPY CODING!! 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 68. 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 69. TVM ! Identity and Access Management (IAM) ! TVM WAR AnonymousTVM IdentityTVMElasticBeanstalk! TVM Security Token Service SSL 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 70. (1/2) ! IAMTVMTVMUser! TVM 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 71. (2/2) ! ! (TVM){ "Statement": [ { "Effect": "Allow", "Action": "sts:GetFederationToken", "Resource": "*" }, { "Effect": "Allow", "Action": "iam:GetUser", "Resource": "*" }, { "Effect": "Allow", "Action": "sdb:*", "Resource": "*" }, { "Effect":"Allow", "Action":"dynamodb:*", "Resource":"*" }, { "Effect": "Allow", "Action": "sqs:*", "Resource": "*" }, { "Effect": "Allow", "Action": "s3:*", "Resource": "*" }, {"Effect": "Allow", "Action": "sns:*", "Resource": "*" } ] } 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 72. TVM ! TVMHTTP Security Token Service SSL / / 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 73. [] Token Vending Machine (TVM) / AWS1. Security Token Service 1 STS 2. 3. AWS3 TVM 1 2 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 74. TVM AnonymousTVM ! samples/S3_SimpleDB_SNS_SQS_DemoTVM TVM URL: http://anon-example.elasticbeanstalk.comAndroid: AwsCredentials.properties tokenVendingMachineURL=anon-example.elasticbeanstalk.com iOS: Constants.h #define TOKEN_VENDING_MACHINE_URL @anon-example.elasticbeanstalk.com /registerdevice?uid=&key=/gettoken? uid=&timestamp=&signature= 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 75. TVM IdentityTVM ! samples/S3_SimpleDB_SNS_SQS_DemoTVMIdentity TVM URL: http://id-example.elasticbeanstalk.com : exampleApp (TVMPARAM1 Android: AwsCredentials.properties tokenVendingMachineURL=id-example.elasticbeanstalk.com appName=exampleApp iOS: Constants.h #define TOKEN_VENDING_MACHINE_URL @id-example.elasticbeanstalk.com #define APP_NAME @exampleApp"login() registeruser() 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 76. TVM Client ! Android / iOSTVM Client AmazonClientManagerTVM Client S3_SimpleDB_SNS_SQS_DemoTVM Anonymous TVM S3_SimpleDB_SNS_SQS_DemoTVMIdentity IdentityTVM! 1. TVM (Anonymous or Identity) 2. AmazonClientManager TVMClient3. TVM, TVM Client, Identity TVMSNSID 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.