I'm working on creating and lambda function using javascript to authenticate users using the AWS Cognito and Identity pools. But I need to include below JS library references in my lambda function code
aws-cognito-sdk.js
amazon-cognito-identity.min.js
aws-sdk.min.js"
moment.js
sjcl.js
jsbn.js
jsbn2.js
Given below is the part of the code that I used in the handler of the lambda function. How can I include the references to above javascripts inside my lambda function code?
exports.handler = function(event, context, callback)
{
// Cognito Identity Pool Id
AWS.config.region = 'us-east-1';
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:xxxxxxxxxx',
});
// Cognito User Pool Id
AWSCognito.config.region = 'us-east-1';
AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:xxxxxxxx'
});
//...rest of the logic..
}