I have a cognito user pool and identity pool. I have created an user in user pool. I got the tokens i.e. access, refresh, id tokens using lambda for that user. Now I want to generate the temporary credentials i.e. access key and secrete access key for that user to access the aws services. How could I do this? This is piece of code i used to generate tokens.
var authenticationDetails = new cognito.AuthenticationDetails(authenticationData);
var userData = {
Username : '*****',
Pool : userPool
};
var cognitoUser = new cognito.CognitoUser(userData);
cognitoUser.authenticateUser(authenticationDetails, {
onSuccess: function (result) {
console.log(result);
what changes should i do in this to get credentials? Thank you....