(I apologize in advance for the wall of text.)
tl;dr
Netlifyâs Lambda functions seem to be fairly straight forward to set up, if you follow their documentation. Personally, I would use AWS Lambda myself, and would suggest you do the same. If you wish, I can help you with setting up AWS for logging; no charge to you from me. Otherwise, if you donât want to use AWS for any reason, use Google Analytics.
Alrighty, on to the giant wall of text I posted (again, I apologize for that)âŚ
It appears that Netlifyâs Lambda functions are stored in the ./functions
(by default, anyway) directory of a GitHub/GitLab/BitBucket repository linked to Netlify. For now, Netlifyâs functions seem to only support JavaScript and Go functions, so if you donât know either of those I think youâre out of luck with using Netlifyâs Lambda functions.
Personally, I wouldnât use Netlifyâs functions. Netlifyâs functions run on Amazon Web Serviceâs Lambda service (aka AWS Lambda). Although itâs not completely free (though if youâre smart, you can likely significantly reduce your costs), youâd likely get more customizability and functionality with using AWS Lambda yourself (since AWS Lambda also supports Python, .NET Core (basically C#), Java, and Ruby, if you know any of those languages).
If youâd like assistance with setting up Amazon Web Services for logging, Iâd be more than happy to help. Although Iâm by no means an AWS expert (or even aficionado), I certainly know my way around AWS and can certainly help you (note my âWeb Developerâ tag). Note that you will need to provide your own AWS account; for your security, I will only provide help via messages and I will not access your AWS account (and AWS does require a credit card for account activation, though you will not be charged during activation). Additionally, if you do choose to use AWS, the following services will be used (for reference, all prices are in USD and are based on the AWS us-west-2 (Oregon)
service region):
- Amazon API Gateway - $1.00 USD per 1,000,000 (1 million) HTTP requests, per month; I can assist you in making the most of this (with you needing 10,000 requests before youâre even charged a cent).
- Amazon Simple Storage Service (aka S3) - $0.023 (2.3 cents) per gigabyte stored, per month stored; $0.005 (1/2 a cent) per 1,000 PUT, POST, COPY, and LIST requests; and $0.0004 per 1,000 GET, SELECT, and other requests; for text, even just a gigabyte of storage should be far more than enough before you download the logs to your computer, let alone get charged anything. As for the requests, I donât foresee any substantial cost coming from the POST requests your functions would be making.
- AWS Lambda - $0.20 (20 cents) per 1 million function invocations and $0.0000166667 (about 1/5 of a cent) per GB-second of compute time*; since Lambda has a (very generous) free tier available to all current AWS users, youâre unlikely to run into any costs here.
- AWS Cloudwatch - $0.25 (25 cents) per GB of logs ingested and $0.03 (3 cents) per GB of logs stored per month; if youâre only using AWS Lambda and Amazon API Gateway, youâll be unlikely to run into any costs here, since Cloudwatch also offers a fairly generous free tier.
- AWS Data Transfer - $0.09 (9 cents) per GB out from AWS to the internet (data egress) and $0.00 (free) per GB in to AWS from the internet (data ingress); both are per month; if youâre only using AWS for logs, you should be fine with this cost and transferring text out of AWS isnât terribly expensive; additionally, your first GB out per month is free.
- AWS Cost Management - $2.00 per budget per month; this will act as a âlast line of defenseâ against you getting any surprise charges. You should not get any charges here, as your first 2 budgets are free.
As I alluded to earlier, Iâd be more than happy to help set this up for you and at no charge; just send me a message and I can send you a bit more info about the possible costs of using AWS, a better explanation of how each service will be used, and you can make a final decision about using AWS, prior to us getting it set up if you chose to continue.
If you really want to be sure that you wonât pay anything (and you donât need to flexibility of AWS), Iâd recommend using Google Analytics as mentioned in the post you marked as the solution to your problem.