linz / geostore

Central storage, management and access for important geospatial datasets
MIT License
33 stars 2 forks source link

Capture and log user information in endpoint requests to help with monitoring and troubleshooting #1223

Open MitchellPaff opened 2 years ago

MitchellPaff commented 2 years ago

There is no user ID's available to us in the lambda context object, at least not without implementing API gateway +Authorization first so we can't log this information using the python logger. However this can be implemented by using AWS CloudTrail. Create a new 'Data Events' trail using CDK that listens to our lambda endpoints and then update geostore configuration in elastic shipper if needed. Log shipper should automatically pick up these CloudTrail logs with user identifications.

billgeo commented 2 years ago

@MitchellPaff can you please update here with your initial findings.

billgeo commented 2 years ago

Hi @MitchellPaff . Sorry forgot to talk about this one this morning. Fine to finish this off if it's only a little bit of work. Let me know when you've got something ready to review.