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
9
votes
1 answer

How can I stream a specific log file from multi-container Docker Elastic Beanstalk to CloudWatch?

I have a web service deployed to an Elastic Beanstalk environment running the Docker Multi-Container stack. I have enabled Log Streaming to CloudWatch on the environment, so about five different log groups show up in Cloudwatch, and so when I click…
9
votes
3 answers

Set LogStreamName for AWS Lambda call

We deploy node.js functions onto AWS Lambda. When calling them, they auto-generate an AWS CloudWatch log. The log group is set to the name of the Lambda function, that´s helpful. But the log stream is named like this:…
Tobias
  • 7,238
  • 10
  • 46
  • 77
9
votes
4 answers

tailing aws lambda/cloudwatch logs

Found out how to access lambda logs from another answer Is it possible to tail them? (manually pressing refresh is cumbersome)
american-ninja-warrior
  • 7,397
  • 11
  • 46
  • 80
9
votes
1 answer

Trigger AWS lambda function after ECR event

I am trying to get an AWS Lambda function to run whenever a new image is pushed to an AWS container registry. I have created and tested the function which works fine. I have then created a simple CloudWatch event rule with the pattern: { "source":…
theduck
  • 2,589
  • 13
  • 17
  • 23
9
votes
3 answers

Can I change metric units on CloudWatch?

I am sending metric data to CloudWatch, and they were sent to AWS with StandardUnit.Count unit, but I later changed them to StandardUnit.Milliseconds. On my dashboard in AWS I still see the data in Count unit. Is it possible to force AWS to show it…
godzsa
  • 2,105
  • 4
  • 34
  • 56
9
votes
2 answers

AWS SDK can't add Lambda as target to Cloudwatch event

I am developing an application where I need to schedule a task, so I am using AWS Lambda for it.However, the scheduled time is dynamic, since it depends on the user request, it can't be scheduled using AWS Console, so I use AWS Javascript SDK to…
9
votes
3 answers

Can AWS Cloudwatch alarms detect no activity?

I want to set up cloud watch alarms to fire when there is no activity, for example, to fire a cloud watch alarm when a Lambda function does NOT execute for at least 5 minutes. I set up a simple test lambda function (testLambdaFunc), and then set up…
9
votes
3 answers

How to create cloudwatch event using cloudformation template?

I am using cloudwatch scheduled event to trigger my lambda function after specific time interval. I would like to use cloud-formation template to add this rule in cloudwatch. I have gone through cloudformation templates documentation but I am not…
9
votes
2 answers

How to uninstall awslogs-agent-setup.py?

Only after using sudo python ./awslogs-agent-setup.py --region us-east-1 on my Amazon Linux AMI, I found this tidbyte of Caution from AWS docs: Do not update the CloudWatch Logs agent using the RPM installation method if you previously used the…
8
votes
1 answer

Unable to start the environment. To retry, refresh the browser or restart by selecting Actions, Restart AWS CloudShell

I am unable to use aws cloud shell. I operate in the supported region (Ireleand) and my user has the right permissions (AWSCloudShellFullAccess). { "Version": "2012-10-17", "Statement": [ { "Action": [ "cloudshell:*" ], "Effect": "Allow",…
Dan Friedman
  • 427
  • 2
  • 6
  • 16
8
votes
1 answer

Why do some metrics missing in cloudwatch metrics view?

I am using cloudwatch metric view to view dyanmodb metrics. When I search ReadThrottleEvents, only a few tables or index shown in the list. I wonder why the metrics are not visible for all tables? Is there any configuration I need to configure in…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
8
votes
2 answers

No CloudWatch logs for ECS task with reason "Essential container in task exited"

A task is running for a few seconds before terminating, I don't know why, and it's not pushing any logs. I'm using the "awslogs" driver and the log group exists in CloudWatch. The "Logs" tab is empty. The log-stream is created in CW but it's devoid…
Dustin Oprea
  • 9,673
  • 13
  • 65
  • 105
8
votes
2 answers

Need Cloudwatch rule (scheduled one) that runs only once

I've understood AWS Cloudwatch Scheduled Rules (Amazon EventBridge Rules) which works by defining CRON expression. The documentation mentions rules that triggers repetitively on a given time. Such as, run a Cloudwatch rule every 15 mins and so…
Tejaskumar
  • 754
  • 8
  • 24
8
votes
2 answers

CloudWatch log group is not deleted on cdk destroy

I have this CDK code: const logGroup = new LogGroup(this, 'MyAppLogGroup', { logGroupName: 'myapp', retention: RetentionDays.ONE_DAY }); When I run cdk deploy, log group is created in CloudWatch, but when I run cdk destroy, it's not deleted. Is…
Héctor
  • 24,444
  • 35
  • 132
  • 243
8
votes
3 answers

How can I give cloudwatch log permission to invoke a lambda?

I am using this command to stream log to a lambda function. aws logs put-subscription-filter --log-group-name $LOG_GROUP_NAME --filter-name $LAMBDA_NAME --filter-pattern '' --destination-arn $LAMBDA_ARN but got this error: An error occurred…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523