Questions tagged [amazon-cloudwatchlogs]

Amazon CloudWatch Logs allows aggregation and management of log events sent to it by AWS or custom services. Use this tag when asking about log groups, log streams, and metric filters. Use amazon-cloudwatch instead when asking only about CW metrics or CW alarms.

Amazon CloudWatch Logs allows aggregation and management of log events sent to it by AWS or custom services.

Usage Guidance

  • Use this tag when asking about log groups, log streams, metric filters, etc.
  • Do not use this tag when asking only about CW metrics or CW alarms; use instead.

Resources

862 questions
6
votes
4 answers

How to get the Aws cloudwatch logs using java

We are working on AWS Lambda and Cloudwatch logs. Now, I want fetch all the log events from the Cloudwatch logs without using logStreamName by Java. Since we are generating the logstream in dynamic way, am not sure how to fetch all the logs from the…
kaviya .P
  • 469
  • 3
  • 11
  • 27
6
votes
1 answer

What is the default retention period for LogGroup in Cloud Watch?

Here is documentation about creating Cloud Watch LogGroup via Cloud Formation. They said: RetentionInDays The number of days log events are kept in CloudWatch Logs. When a log event expires, CloudWatch Logs automatically deletes it. For valid…
Cherry
  • 31,309
  • 66
  • 224
  • 364
6
votes
1 answer

CloudWatch agent doesn't recognize presence of IAM Role

I'm trying to use the CloudWatch logs agent on a RedHat instance with an IAM role attached. The role has full access to CloudWatch. I installed and setup the agent using the instructions here:…
6
votes
3 answers

AWS CloudWatch Logs metrics broken graph

We've configured a metric filter for a CloudWatch Log Group which collects data for one of our processes. Initially, we had only one ec2 instance associated with the log stream of the log group. The retrieved data from the logs was showing up nicely…
6
votes
1 answer

Where are the SNS/SMS logs? Cloudwatch empty

Context: I use Amazon AWS, SNS service, to manually send SMS as a trial before I do any integration by code. I want to log the SMS reponses (the JSONs that appear here: http://docs.aws.amazon.com/sns/latest/dg/sms_stats_cloudwatch.html ) at some…
6
votes
1 answer

Create a logStream for each log file in cloudwatchLogs

I use AWS CloudWatch log agent to push my application log to AWS Cloudwatch. In the cloudwatchLogs config file inside my EC2 instance, I have this entry: [/scripts/application] datetime_format = %Y-%m-%d %H:%M:%S file =…
5
votes
1 answer

Enable CloudWatch logs in API GatewayV2 Stage with cloud formation

There is a similar question but it does not use AWS::ApiGatewayV2::Stage, and I need the AutoDeploy that only the V2 seems to provide. How do I enable CloudWatch logs and log full message data (as per the image) using CloudFormation in an AWS API…
diegosasw
  • 13,734
  • 16
  • 95
  • 159
5
votes
1 answer

AWS Elastic Beanstalk: Custom Cloudwatch Logs not showing despite IAM permissions and custom config

I've been having issues setting up custom log file streaming to CloudWatch from my AWS Elastic Beanstalk project. For reference, I've tried the suggestions in "AWS Elastic Beanstalk: Add custom logs to CloudWatch?" to no avail. Essentially, when I…
5
votes
2 answers

CloudWatch Cost - Data Processing

I'd like to know if possible to discover which resource is behind this cost in my Cost Explorer, grouping by usage type I can see it is Data Processing bytes, but I don't know which resource would be consuming this amount of data. Have some any idea…
5
votes
2 answers

AWS log Insigts parse NGINX log

I am trying to use aws log insights to run query on my log group that contains nginx log. This is my log format that I have setup on my ec2 machine: log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent…
5
votes
1 answer

CloudWatch Insights By Date

I'm trying to create a CloudWatch Insights query for Amazon Connect that will give me call counts by date. I'm able to get the number of log messages by date, however, I need to only count unique ContactId's. The query I have has many duplicated…
5
votes
2 answers

How do I find the request ID for a failed Lambda invocation?

On my AWS Lambda dashboard, I see a spike in failed invocations. I want to investigate these errors by looking at the logs for these invocations. Currently, the only thing I can do to filter these invocations, is get the timeline of the failed…
keian
  • 307
  • 4
  • 11
5
votes
2 answers

Group By after parsing a message in AWS cloudwatch insights

I have messages which are like below, the following message is one of the messages (have so many JSON formats which are not at all related to this) request body to the server {'sender': '65ddd20eac244AAe619383e4d8cb558834', 'message': 'hello'} I…
5
votes
1 answer

Cloud watch log access to an IAM user for only only one specific log group

I initially tried with all the json policies in the below link. https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-identity-based-access-control-cwl.html#customer-managed-policies-cwl And i finally got a solution of giving "list, read,…
5
votes
1 answer

How to use a CloudWatch custom log group with Python Shell Glue job?

I have some "Python Shell" type Glue jobs and I want to send the job logs to a custom CloudWatch log group instead of the default log group. I am able to achieve this for "Spark" type glue jobs by providing job parameters as…
Nisman
  • 1,271
  • 2
  • 26
  • 56