I'm working on a ReactJS project and using Amplify for Signup/Signin. On signup, I have a post confirmation lambda trigger in Python that stores the user information (username, cognito id, etc.) in an on-prem database. I would like to also store the identity id, but I can't seem to find it in the event or context variable. I can find the identity id by calling Auth.currentCredentials() in React after the user has signed in, but would like to get this information during the signup process. 
Any help on this would be appreciated. Thank you.
I had this same issue, and found that it is indeed not available in the auth trigger because the user has to authenticate to retrieve it, as you said.  There is also not a way (that I could find) to grab this information using the AWS admin SDK.
I resorted to running a small check after the user logs into the app and doing a call to save the identityId where I needed it.  The purpose was to allow other users to access the user's media after logging in, by using the user's own identityId with amplify to pull a profile picture.  
Hope this helps.
How to get Cognito Identity Id in Post Confirmation Lambda Trigger in Python using Amplify React?