
Get your Better Stack source token for new or existing sources at Better Stack -> Sources.
Forward logs from your AWS CloudWatch to Better Stack.
In AWS Console -> Lambda -> Functions -> Create function, create a new Lambda function with these settings:
logtail-aws-lambda
Node.js 18.x
x86_64
Clone logtail/logtail-aws-lambda repository and build it:
git clone https://github.com/logtail/logtail-aws-lambda.git
cd logtail-aws-lambda
npm run build
In AWS Console -> Lambda -> Functions -> logtail-aws-lambda -> Code source, select Upload from -> .zip file and upload the build/logtail-aws-lambda.zip
archive.
In AWS Console -> Lambda -> Functions -> logtail-aws-lambda -> Configuration, select Environment variables section, add a new variable BETTER_STACK_SOURCE_TOKEN
and paste your Better Stack source token as a value.
Get your Better Stack source token for new or existing sources at Better Stack -> Sources.
Go to CloudWatch -> Log groups and open the group you'd like to send to Better Stack.
In Subscription filters tab, choose Create -> Create Lambda subscription filter with these settings:
logtail-aws-lambda
logtail-aws-lambda-filter
You should see your logs in Better Stack -> Live tail.
Please let us know at hello@betterstack.com.
We're happy to help! 🙏