Skip to content

Commit 7495da7

Browse files
Create cloudwatch-metric-streams-firehose-terraform.json
1 parent 19209e0 commit 7495da7

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"title": "CloudWatch Metric Streams to Amazon Data Firehose",
3+
"description": "Create CloudWatch Metric stream using Amazon Data Firehose and save them in Amazon S3",
4+
"language": "",
5+
"level": "300",
6+
"framework": "Terraform",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"This pattern sets up Amazon CloudWatch Metric stream and associates that with Amazon Data Firehose. Through this setup you can continuously stream metrics to a destination of choice with near-real-time delivery and low latency. There are various destinations supported, which include Amazon Simple Storage Service (S3) and several third party provider destinations like Datadog, NewRelic, Splunk and Sumo Logic, but in this pattern we use S3. This setup also provides capability to stream all CloudWatch metrics, or use filters to stream only specified metrics. Each of the metric streams can include up to 1000 filters that can either include or exclude namespaces or specific metrics. Another limitation for a single metric stream is it can either include or exclude the metrics, but not both. If any new metrics are added matching the filters in place, an existing metric stream will automatically include them.",
11+
"Traditionally, AWS customers relied on polling CloudWatch metrics using API's, which was used in all sorts of monitoring, alerting and cost management tools. Since the introduction of metric streams, customers now have the ability to create low-latency scalable streams of metrics with ability to filter them at a namespace level, for example to include or exclude metrics at a namespace level. Further to that, if there is a requirement to filter at a more granular level, Metric Name Filtering in metric streams comes into play, addressing the need for more precise filtering capabilities.",
12+
"One of the good features of metric streams is that, it allows you to create metric name filers on metrics which may not exist yet on your AWS account. For example, you can define metrics for AWS/EC2 namespace if you know that the application will produce metrics for this namespace, but that application may yet to be deployed in the account. In this case those metrics will not exist in your AWS account unless the service is provisioned.",
13+
"This pattern also creates the required roles and policies for the services, with the right level of permissions required. The roles and policies can be expanded if additional services come into play, based on principle of least privilege."
14+
]
15+
},
16+
"gitHub": {
17+
"template": {
18+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/cloudwatch-metric-streams-firehose-terraform",
19+
"templateURL": "serverless-patterns/cloudwatch-metric-streams-firehose-terraform",
20+
"projectFolder": "cloudwatch-metric-streams-firehose-terraform",
21+
"templateFile": "main.tf"
22+
}
23+
},
24+
"resources": {
25+
"bullets": [
26+
{
27+
"text": "Use metric streams to continually stream CloudWatch Metrics",
28+
"link": "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html"
29+
},
30+
{
31+
"text": "Amazon Data Firehose - Streaming Data Pipeline",
32+
"link": "https://aws.amazon.com/firehose/"
33+
},
34+
{
35+
"text": "Amazon S3 - Cloud Object Storage",
36+
"link": "https://aws.amazon.com/s3/"
37+
}
38+
]
39+
},
40+
"deploy": {
41+
"text": [
42+
"terraform init",
43+
"terraform plan",
44+
"terraform apply"
45+
]
46+
},
47+
"testing": {
48+
"text": [
49+
"In the same account and region, launch an EC2 instance. You should be able to see metrics arrive n S3 bucket in few minutes."
50+
]
51+
},
52+
"cleanup": {
53+
"text": [
54+
"terraform destroy"
55+
]
56+
},
57+
"authors": [
58+
{
59+
"name": "Kiran Ramamurthy",
60+
"image": "n/a",
61+
"bio": "I am a Senior Partner Solutions Architect for Enterprise Transformation. I work predominantly with partners and specialize in migrations and modernization.",
62+
"linkedin": "kiran-ramamurthy-a96341b",
63+
"twitter": "n/a"
64+
}
65+
],
66+
"patternArch": {
67+
"icon1": {
68+
"x": 20,
69+
"y": 50,
70+
"service": "cloudwatch",
71+
"label": "Amazon CloudWatch"
72+
},
73+
"icon2": {
74+
"x": 50,
75+
"y": 50,
76+
"service": "kinesis-firehose",
77+
"label": "Amazon Kinesis Firehose"
78+
},
79+
"line1": {
80+
"from": "icon1",
81+
"to": "icon2",
82+
"label": "Mertics"
83+
},
84+
"icon3": {
85+
"x": 80,
86+
"y": 50,
87+
"service": "s3",
88+
"label": "Amazon S3"
89+
},
90+
"line2": {
91+
"from": "icon2",
92+
"to": "icon3",
93+
"label": "Mertics"
94+
}
95+
}
96+
}

0 commit comments

Comments
 (0)