AWS Cognito user pool and Facebook login

I am learning mobile app development and have been using aws cognito for user management because all of the my resources are in AWS i.e. lambda, rds etc.

if a user signup using email and password using cognito user pool then it works fine because user gets added to the pool and then user is able to get the credentials from identity pool.
But in case of facebook login, i can get the access token from facebook and use that token to get AWS credentials but in this case CognitoUser object is null and there is no user created in the identity pool. Is there a way to make this happen as it would be really useful to maintain one user directory. Also i m using custom login page.

thanks in advance and sorry if this has already been answered in some other post. AWS documentation and examples are really bad.