I am not able to understand how to get the SAMLAssertion token for passing as one of the parameters for the STS method -> assumeRoleWithSAML.
Please help me understand that as I already went through the DOC for assumeRolesWithSAML.
Code fragment that I am using,
var params = {
PrincipalArn: 'arn:aws:iam::12345678910:user/userAccount',
RoleArn: 'arn:aws:iam::12345678910:role/admin',
SAMLAssertion: 'a4FameaC4Twkfjhsadkfjhsfkhsdfsdhafislahsdfaiughdiguhdfiughdfiughdagiuhdafgiusfhdaiiiilholfjpwfmwpefmo;ivnjeiuvneinveiovnA==',
};
var stsPromise = new AWS.STS({ apiVersion: '2011-06-15' }).assumeRoleWithSAML(params).promise();
It says,
'Invalid base64 SAMLResponse (Service: AWSOpenIdDiscoveryService; Status Code
: 400; Error Code: AuthSamlInvalidSamlResponseException; Request ID: b38250b8-39
dc-4188-9bdd-a69c102a5168)'
Please help me out with understanding what value to be passed for SAMLAssertions? Is there any other AWS service that I can call to get it?