Skip to content

pubpub/analytics-lambda

 
 

Repository files navigation

PubPub Analytics Lambda

Small lambda function to handle PubPub analytics events.

Setup

git clone https://github.com/pubpub/pubpub-analytics-lambda.git --recurse-submodules

First make sure you have terraform installed

brew install terraform

Then make sure you have AWS credentials set up

Set up your AWS credentials in ~/.aws/credentials like so (or run aws configure)

[pubpub]
aws_access_key_id = XXXX
aws_secret_access_key = XXXX

and your ~/.aws/config like so

[default]
output = json

[pubpub]
region = us-east-1
output = json

Then run

AWS_PROFILE=pubpub
# or for fish
# set -x AWS_PROFILE pubpub

Then you can initialize the terraform project

cd terraform/aws
terraform init

Deploy

Once you have made the necessary changes to the lambda function, you can deploy by running

pnpm run deploy
# not `pnpm deploy`, because that's a reserved command

in the root of the project.

And you should be done.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 46.9%
  • TypeScript 39.5%
  • Shell 13.6%