awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
921 stars 266 forks source link

AppSync API (Graphql) - user access logs #587

Open kukodev opened 4 years ago

kukodev commented 4 years ago

Hi, I want to know what user accessed what resources within my AppSync API (Amplify stack application)

CloudTrail doesnt satisfy my requirements because it provides admin logs rather than user logs.

CloudWatch does log graphql requests but doesnt provide cognito user details.

Currently Im trying to create my own solution, namely lambda function that would write log to dynamoDB audit table each time graphql api is being requested. The problem is... that I am unable to find the way to trigger that lambda on every request.

Any ideas how to achieve it? Any other approaches?