· 9 years ago · Aug 23, 2016, 05:08 PM
1AWS.config.credentials = new AWS.CognitoIdentityCredentials({
2 IdentityPoolId: 'eu-west-1:0XXX6a-XXX4-4408-8310-24XXX57XXXa',
3
4 Logins: {
5 'accounts.google.com': authRes.hg['id_token']
6 }
7 });
8 var that =this;
9 AWS.config.credentials.get(function(err){
10 if (err){
11 console.log(err);
12 return;
13 }
14 console.log(AWS.config.credentials.identityId);
15 });
16
17{
18"Version": "2012-10-17",
19"Statement": [
20 {
21 "Effect": "Allow",
22 "Action": "*",
23 "Resource": "*"
24 }
25]
26
27var apigClient = apigClientFactory.newClient({
28
29 accessKey: AWS.config.credentials.accessKeyId, //'ACCESS_KEY',
30 secretKey: AWS.config.credentials.secretAccessKey, //'SECRET_KEY',
31 sessionToken: AWS.config.credentials.sessionToken,
32 region: 'eu-west-1'
33
34 });
35 apigClient.appGet().then(x=>console.log(x));