When receiving a request from a user, the following flow gets executed in my serverless infrastructure:
API Gateway => Custom authorizer (performs a bunch of checks and sets principalId with user id) => Lambda function.
The lambda function has a role, lb-role
.
I have setup cloudtrail to log DynamoDB data event (GetItem
/ DeleteItem
...). It is working as expected and whenever my lambda gets called and access data, it logs the access from lb-role
.
However, I would also like the log to contain the end user accessing this data. Is it somehow possible ?