Our company is on the Enterprise plan, and we use serverless functions for private apps.
For audit purposes, I need to automate the weekly export of serverless function audit logs. I've checked the HubSpot API, and it seems that there is no endpoint returning the necessary data.
What solution or API is available to automate this process?
At the moment it does not appear that there is a way to automate the export of serverless function audit logs.
A potential workaround could be having each of your serverless functions send logs to an external logging service (i.e. AWS CloudWatch) and do the automated exports there.
✔️ Did this post help answer your query? Help the community by marking it as a solution.
At the moment it does not appear that there is a way to automate the export of serverless function audit logs.
A potential workaround could be having each of your serverless functions send logs to an external logging service (i.e. AWS CloudWatch) and do the automated exports there.
✔️ Did this post help answer your query? Help the community by marking it as a solution.
Ah, I’ve run into this too. Feels like an oversight on HubSpot’s part. Just to check, are you already piping your logs somewhere like AWS CloudWatch or S3? If not, a quick win is to manually log your serverless function events inside each function and push them to CloudWatch using something like console.log() or a custom log handler. Once they land there, you can use a scheduled Lambda or CloudWatch subscription filter to export weekly. I had a setup once where we used EventBridge to trigger a log exporter every Friday and dumped it to S3 as a CSV. Not perfect, but it worked. Let me know how you're currently capturing logs, and I can help map it out.