New Relic : Integrate Amazon CloudWatch Metric Streams with Terraform –

Our team, focused on re-engaging dormant users, requires a lot of experimentation to see what helps folks realize the value of our product. Because we need to spin up experiments and infrastructure and iterate quickly, we use Amazon Web Services (AWS) services including Amazon Lambda, Amazon Simple Email Service (SES), and a variety of others. Then, we rely on data from CloudWatch flowing into New Relic to help us monitor and gauge those AWS services.
We were using API polling for the CloudWatch data, but switching to CloudWatch Metric Streams and Terraform reduced cost per metric, saved time, and gave us access to complete CloudWatch metric data. Want to learn from our experiences? Here’s how we did it.
Our challenges
We had set up API polling for the CloudWatch data, calling the server to check for changes at regular intervals, and then updating our client application. Polling for metrics like this was slow, costly, and we couldn’t get at all the metrics-custom or otherwise-from CloudWatch.
We faced several challenges:
Our solution
Searching for a solution led us to Move Faster with New Relic One and Amazon CloudWatch Metric Streams, where we learned that we could switch from the API polling method to receiving streamed data from CloudWatch. Because our team also prefers an infrastructure-as-code approach, we wanted to find a way to have our solution in Terraform so we could make tracked changes to our infrastructure. Using Terraform, you can manage multiple entities in a command-line interface workflow.
We took a couple of shortcuts:
The results
Moving to CloudWatch Metric Streams gave us:
To try out this approach yourself, you can follow the steps in the next section.
How to set up CloudWatch Metric Streams with Terraform
New Relic Inc. published this content on 25 October 2021 and is solely responsible for the information contained therein. Distributed by Public, unedited and unaltered, on 25 October 2021 20:35:14 UTC.