sladg / nextjs-lambda

Lambda deployments for Nextjs12 & Nextjs13 (standalone). Easy CLI commands to get your standalone Next output to run in AWS Lambda (not @Edge)! Uses CDK in behind and produces code zips importable to Terraform, Serverless, Azure, etc.
MIT License
173 stars 19 forks source link

Cloudwatch alerts #55

Closed sennett closed 1 year ago

sennett commented 1 year ago

How do you guys configure cloudwatch alerts without Cloudformation config drift? Right now my plan is to fork the repo and add things to NextStandaloneStack, but is there something you do instead? I'm trying to get alerts when there are HTTP errors over a certain threshold, for both Next routes and image optimisation.

sennett commented 1 year ago

I see that AWS does not automatically include linked resources in the Cloudformation stack so I can bolt these on. As long as I don't edit resources created as part of the stack itself, there is no drift.

sladg commented 1 year ago

Hey! Feel free to create your CDK stack from lib/cdk/stack.ts. I would deem alerts to be over the basic configuration so I don't plan to add them to the repository.