Creating AWS lambda alerts using terraform

How can we create alerts using Terraform for managed services like AWS Lambda, SQS etc.,

Hi, thank you for raising the issue. Can you elaborate on what it is you’re trying to accomplish? Terraform can be used to manage infrastructure in AWS, as well as New Relic, but the provider you will use to accomplish your goal will differ, and you can use many providers at the same time.

Hello Zleslie,

I am trying to implement alerts for Lambda function, like
Number of 4XX, 5XX errors in last 5 min, but it says…
If you want to see errors, distributed tracing, and invocations for this function, start instrumenting your Lambda functions.

Could you please help if there is a way to configure these alerts?

I believe you will want to start with instrumenting your Lambda functions. This document will likely help.

https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/enable-lambda-monitoring/enable-serverless-monitoring-aws-lambda

Once you have errors reported to Newrelic, you could use the appropriate terraform resources to configure the alerts.

https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/resources/nrql_alert_condition

That should probably get you headed in the right direction.