This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************************** | |
This is from the tutorial at http://blog.backspace.academy | |
Please go there for the latest code and explanation. | |
******************************************************************************************/ | |
(function($){ | |
var AWS_ACCOUNT_ID = 'XXXXXXXX'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
var AWS_ACCOUNT_ID = 'XXXXXXXXX'; | |
var AWS_REGION = 'us-east-1'; | |
var COGNITO_IDENTITY_POOL_ID = 'us-east-1:XXXXXXXd-XXXX-XXX-XXXX-XXXXXXXX'; | |
var COGNITO_IDENTITY_ID, COGNITO_SYNC_TOKEN, AWS_TEMP_CREDENTIALS; | |
var cognitosync; | |
var IAM_ROLE_ARN = 'arn:aws:iam::XXXXXXXXXX:role/Cognito_CognitoBrowserExampleAuth_DefaultRole'; | |
var COGNITO_SYNC_COUNT; | |
var COGNITO_DATASET_NAME = 'TEST_DATASET'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createS3(){ | |
var bucket = new AWS.S3({ | |
params: { | |
Bucket: 'backspace-cognito-test' | |
} | |
}); | |
//Object key will be facebook-USERID#/FILE_NAME | |
var objKey = 'facebook-'+FACEBOOK_USER.id+'/test.txt'; | |
var params = { | |
Key: objKey, |
NewerOlder