Slide 12
Slide 12 text
// Cognito
AWS.config.region = 'ap-northeast-1'; // Region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'ap-northeast-1:12345679-1234-1234-1234-123456789012',
});
AWS.config.credentials.get();
// S3 Put
var s3 = new AWS.S3({ params: { Bucket: bucket } });
s3.putObject({
Key: now.getTime() + '.json', ContentType: 'application/json', Body: blob
},
function(err, data) {
if (data !== null) {
alert('Success');
} else {
alert('Fail');
}
}
);
2016/3/21 JAWS-UGԬ ·ͨೱ͍ʹAWSͷΛͯ͠ΈΑ͏ 12