Cognitoとは この記事が一番わかりやすかった。 http://qiita.com/imaifactory/items/b66cdf91118e3be6fe17 前提 test.png がおいてある ARN(arn:aws:iam::00000000000:role/Cognito_photo1Auth_DefaultRole)にS3の操作権限を設定してある { "Version": "2012-10-17", "Statement": [{ "Action": [ "mobileanalytics:PutEvents", "cognito-sync:*", "s3:*" ], "Effect": "Allow", "Resource": [ "*" ] }] } require 'aws-sdk' # Cognitoクライアントを作成する cognito_identity = Aws