title: AWS Cognito : How to terminate/close user session from server
body: <p>I have written a lambda function and using <code>AdminInitiateAuthInput</code> API in my function to authenticate the user/initiate the user session.</p>
  
  <p>I am using AWS API gateway.
  I use the ID token received from the AdminInitiateAuthInput as the Authorization header while making API calls. </p>
  
  <p>I want to terminate/logout the user, if he sends the request for logout.</p>
  
  <p>Which is the API to close/terminate Cognito user session?</p>
  
  <p>I came across <code>AdminUserGlobalSignOut</code> API, but it will terminate all the sessions for the user.</p>