An SST app that collects telemetry data from the SST CLI and sends the events to Amplitude. It also backs up the events to AWS S3.
This app uses an Api, Topic, Bucket, and a Kinesis Firehose construct.
It works like so:
- The API endpoint receives the SST CLI telemetry events and sends a message to the
Topicwith the events payload. - A Lambda function is subscribed to the
Topicand sends the events to Amplitude. - The
Kinesis Firehoseis also subscribed to theTopicand stores the events to theBucket.
Create a .env.local file and add the Amplitude API key.
AMPLITUDE_API_KEY=39470db0a7b31c724c027f491f0c33dc
Optionally configure a custom domain for the API endpoint.
API_DOMAIN=telemetry.domain.com
Start by installing the dependencies.
$ npm installThen start the Live Lambda Development environment.
$ npx sst startDeploy your service to prod by running.
$ npx sst deploy --stage prodThis repo also uses Seed for CI/CD deployments.
Learn more about the Serverless Stack.