This is a companion repo for this blog on bifurcating lambda logs.
The Service Application The Request Log Writing Lambda The CDK stack with Subscription Filter and Function Url
- Install Cargo Lambda
npm install
npm run build
npx cdk synth
npx cdk deploy
Hit the url that appears in the output of the deploy command above to trigger a request. To see the logs, there are two log groups, the original logs are in:
/aws/lambda/airline-service
and the filtered request logs are in:
/aws/lambda/airline-service-requestlogs
When you are done, you can delete the resources by running
npx cdk destroy
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpx cdk deploy
deploy this stack to your default AWS account/regionnpx cdk diff
compare deployed stack with current statenpx cdk synth
emits the synthesized CloudFormation template