Questions tagged [amazon-cloudwatch]

Amazon CloudWatch provides monitoring for AWS cloud resources and the applications customers run on AWS. Use this tag when asking about CW features such as metrics or alarms. Use amazon-cloudwatchlogs instead when asking about log groups, log streams, and metric filters.

From the web site:

Developers and system administrators can use it to collect and track metrics, gain insight, and react immediately to keep their applications and businesses running smoothly. Amazon CloudWatch monitors AWS resources such as Amazon EC2 and Amazon RDS DB instances, and can also monitor custom metrics generated by a customer’s applications and services.

Usage Guidance

  • Use this tag when asking about CW metrics or CW alarms, the CW API, etc.
  • Do not use this tag when asking only about log groups, log streams, metric filters, etc; use instead.
  • Use both if asking about both (for example, if asking about a CW Logs metric filter that aggregates in a CW custom metric that triggers a CW alarm)

Resources

4155 questions
13
votes
1 answer

Using one module local variable in another module in terraform

I am trying to access one module variable in another new module to get aws instance ids which are created in that module and use them in a module Cloud watch alerts which creates alarm in those instance ids . The structure is something like the…
rocky
  • 137
  • 1
  • 2
  • 6
13
votes
2 answers

How to pass and retrieve constant json data to lambda function

I have lambda function defined sth like : def lambda_handler(event, context): #get constant json argument passed from cloudwatch event rule ... What is the way to get the values defined in Target/Configure Input /Constant(Json text).
sakhunzai
  • 13,900
  • 23
  • 98
  • 159
13
votes
1 answer

How can I see AWS Gateway logs for external calls?

I need to be able to see the logs for my calls on AWS API Gateway. When I perform the calls from within Gateway's Dashboard I can see them under the Logs section. How can I see them for external call (e.g.: calls made using curl)? I tried enabling…
Tomas Romero
  • 8,418
  • 11
  • 50
  • 72
13
votes
3 answers

AWS Cloudwatch Heartbeat Alarm

I have an app that puts a custom Cloudwatch metric to AWS every minute. This is supposed to act as a heartbeat so I know the app is alive. Now I want to put an alarm on this metric to notify me if the heartbeat stops. I have tried to accomplish this…
Levitron
  • 1,033
  • 9
  • 14
13
votes
4 answers

How can I monitor memory used by specific process in AWS cloudwatch?

I want to monitor memory used by particular process under cloudwatch in AWS. Do I have to use script to do so? If yes, let me know the steps or some guideline or Can I use cloudwatch logs to report memory utilized by particular process in real time?…
13
votes
2 answers

Can I set the timezone for reports in Amazon Cloudwatch?

I have account on amazon cloud, and I am using Cloudwatch to monitor my website. But all the reports/charts in Cloudwatch are coming in as UTC time. I have to calculate time against my timezone (UTC+05:30, Indian Standard Time). Is there any way to…
Manish Sapkal
  • 5,591
  • 8
  • 45
  • 74
13
votes
3 answers

How do I get the most recent Cloudwatch metric data for an instance using Boto?

I'm trying to get the most recent data for CPU utilization for an instance (actually, several instances, but just one to start with), however the following call doesn't return any data: cw =…
James
  • 24,676
  • 13
  • 84
  • 130
12
votes
2 answers

AWS Cloudwatch Logs Insights: Query into array

I have a Log Group with this kind of messages. { "m": [ { "id": "5b6973c7c86e8689368b4569", "ts": 1634112000.062 }, { "id": "6116d21e02e38f5045079c42", "ts": 1634120807.402 }, { "id":…
icalvete
  • 987
  • 2
  • 16
  • 50
12
votes
1 answer

Issue with EventBridge rule for aws.events

I want to send to CloudWatch logs ALL the events sent to a custom event bus. I created the custom event bus: my-event-bus I created the CloudWatch log group I created the event bus policy so everyone within my account can put an event into…
Peter
  • 2,004
  • 2
  • 24
  • 57
12
votes
0 answers

CloudWatch log insights query scans very slow

I'm looking for help on an issue I'm struggling with. I have created a new log group on CloudWatch, created a few streams and up to 1500 log events in total via AWS putLogEvents method. When I run a simple query to return just the timestamp and…
12
votes
1 answer

How to aggregate the time time between pairs of logs in CloudWatch

Suppose you have logs with some transaction ID and timestamp 12:00: transactionID1 handled by funcX 12:01: transactionID2 handled by funcX 12:03: transactionID2 handled by funcY 12:04: transactionID1 handled by funcY I want to get the time between…
kane
  • 5,465
  • 6
  • 44
  • 72
12
votes
1 answer

AWS CloudWatch Client Side Logging

I am running an react app. I want to log error to my aws cloudwatch without hard coding the access key and secret key on my client side code. I am using 'Error Boundary Component' for catching error. Thank you for your help.
Merlin Joseph
  • 121
  • 1
  • 3
12
votes
1 answer

CDK deployment API Gateway - CloudWatch Logs role ARN must be set in account settings to enable logging

If you're getting the following error when you're trying to deploy an API Gateway (in particular the Stage), you'll need to ensure you have a CloudWatch ern set up against your Account. Blah_V1Stage (V1Stage) CloudWatch Logs role ARN must be set in…
Gul Akbar
  • 121
  • 1
  • 3
12
votes
2 answers

What are Vended Logs in AWS CloudWatch?

From the Features page of Amazon CloudWatch, it says there are three categories of logs: Vended logs - natively published by AWS services on behalf of the customer Logs published by AWS services Custom logs This "natively published by AWS services…
12
votes
2 answers

Why is ApproximateAgeOfOldestMessage in SQS not bigger than approx 5 mins

I am utilising spring cloud aws messaging (2.0.1.RELEASE) in java to consume from an SQS queue. If it's relevant we use default settings, java 10 and spring cloud Finchley.SR2, We recently had an issue where a message could not be processed due to…
David
  • 7,652
  • 21
  • 60
  • 98