Asis
Asis

Reputation: 11

I am working on aws appsync project where one of my resolver is not getting identity information in the context while others are getting

I am working on an AWS sample project where a user will ask question which will goes to AWS AppSync then it will goes to a Lambda function then it will go to Amazon Bedrock where my large language model is sitting. Once model will reply answer will come to the UI via AppSync.

While saving the model response in DynamoDB which is coming through the Lambda function. ctx.identity.username is not getting passed. It's coming as null.

client_context=None,identity=CognitoIdentity([cognito_identity_id=None,cognito_identity_pool_id=None])])

The resolver which is not getting context is linked with mutation agentPublishEvent and function name is Mutation_agentPublishEvent_0

Schema is in the link provided under directory home\aws_appsync\sync_disk\appsync-bedrock-sample-with-ai-agent\cdk-infrastructure\lib\agent-api\schema.graphql

I am also pasting the lync of sample code which I got from aws-samples/appsync-bedrock-sample-with-ai-agent.

I am a kind of stuck here. If anyone knows how to do that please help.

I need to pass identity related information ctx.identity.username to DynamoDB while getting response through LLM which will come via a Lambda function.

Upvotes: 1

Views: 56

Answers (0)

Related Questions