Lambda function coupled with a DynamoDB table serving as a visitor counter
This Lambda function is triggered by API gateway. In each run, it increases the value in the DynamoDB table by 1 and then returns the current value.
DynamoDB table layout:
table name: visitor_counter
primary key: type (String)
column: count (Number)