@Frank@Jay - Is there a way to get the current user attribute (ideally custom attributes) with in the lambda? event.requestcontext.authorizer doesn’t seem to have the attributes..
f
Frank
11/13/2021, 6:58 AM
Hey @karthik r u using IAM or JWT authorizer for ur api?
k
karthik
11/13/2021, 11:41 AM
IAM
karthik
11/13/2021, 3:09 PM
@Frank - so I was able to get it by attaching cognito-idp:AdminGetUser policy to my Api and then use that function within the lambda passing username and userpoolID from event.requestContext.authorizer.iam.cognitoIdentity.amr[2]..