Telemetry
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.
Architecture
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
Topic
with the events payload. - A Lambda function is subscribed to the
Topic
and sends the events to Amplitude. - The
Kinesis Firehose
is also subscribed to theTopic
and stores the events to theBucket
.
Running Locally
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 install
Then start the Live Lambda Development environment.
$ npx sst start
Deploying to Prod
Deploy your service to prod by running.
$ npx sst deploy --stage prod
CI/CD
This repo also uses Seed for CI/CD deployments.
Documentation
Learn more about the Serverless Stack.