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.

0
votes
1answer
18 views

How to have a CloudWatch metric based on CloudFront URL pattern requests count?

I have a CloudFront distribution and need to get a number of requests for some URL pattern (e. g. /user/[0-9]+/profile.html). I would like to have it as a ClowdWatch metric because I want to combine ...
0
votes
1answer
34 views

Triggering AWS Lambda on arrival of new files in AWS S3

I have a Lambda function written in Python, which has the code to run Redshift copy commands for 3 tables from 3 files located in AWS S3. Example: I have table A, B and C. The python code contains: ...
0
votes
0answers
20 views

Cwevents.putRule doesn't excute on lambda

When I ran test, maybe my code did not run into cwevents.putRule() function , I didn't receive any logs. But when I ran this code on node.js ,my code ran very good . Could someone explain to me why? ...
0
votes
0answers
15 views

AWS CloudWatch logstream data completely missing

I am looking for help in troubleshooting a curious CloudWatch issue. I have a CloudWatch logshipping agent setup for /var/log/syslog on Ubuntu. The aws log is full of happy INFO messages such as ...
-3
votes
0answers
17 views

logging/monitoring on AWS: why should i forward cloudwatch logs to elasticsearch? [on hold]

I don't understand why i should stream my cloudwatch logs to elasticsearch. what is the advantage? I've logs from multiple microservices which are streamed to cloudwatch. It is used to monitor the ...
0
votes
1answer
37 views

How to Trigger AWS Lambda job when a data is loaded into a certain S3 bucket?

What is the simplest and most cost effective way to trigger/run an AWS Lambda job whenever a file is put in the AWS S3 Bucket (in a certain path; Even though I know its all object in S3 and not like a ...
0
votes
0answers
8 views

Python code to push file to Aws cloudwatch [closed]

I have a file placed on some local directory and want to push that log file to Cloudwatch using a python script. Can anyone help me with this? I read somewhere that cloudwatch agent can help do it. ...
0
votes
1answer
13 views

Set the Cloudwatch Alarm High and Low thresholds for AWS Fargate

I have created an autoscaling target and a policy which is attached to it. AutoScalingPolicy: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: !Join ['', [!Ref ...
-2
votes
1answer
20 views

I want to monitor on sqs queue for how long the message was on queue?

I want to monitor sqs queue messages i.e how long it took before the message has been popped from queue . I have look into all available apis of cloud watch but i couldn't find anyone relevant. Any ...
0
votes
1answer
11 views

API Gateway Logging - Proxy Lambda - Request Path

I am trying to push my API Gateway logs into Elasticsearch. I have this working with the exception of one annoying flaw. I can't seem to get the original resource path as I am using a proxy lambda ...
0
votes
0answers
22 views

Logging different levels to different logs in cloud watch from an aws lambda

I've been trying to find a solution for a problem we have, in our application we have different types of logs. We want to log changes to (for example) the database in a different way than simple ...
0
votes
1answer
27 views

Idea and guidelines on end to end AWS solution

I want to build an end to end automated system which consists of the following steps: Getting data from source to landing bucket AWS S3 using AWS Lambda Running some transformation job using ...
0
votes
1answer
28 views

AWS service for custom rules to trigger at scheduled times for specific events

I have a workflow where I need to pass in some information that would be stored for a period of time, and then sends off a trigger after a scheduled period of time with the same information. I ...
0
votes
1answer
40 views

Python Lambda Function Breaking with no Errors Logged in CloudWatch

I'm creating a Lambda function in Python which is triggered by uploading an MP3 file to my S3 bucket. The function (which works on my local machine) is supposed to use pydub to create a waveform from ...
0
votes
1answer
20 views

Show EC2 instance counts in AWS Cloudwatch

I'm trying to create a chart in Cloudwatch that shows all the instances I have running, and how many are on-demand versus spot versus reserved. I've been looking for hours and can't seem to find any ...
0
votes
0answers
18 views

How to log application logs using AWS Log Driver to different log groups

I have an application where I want to keep track of three type of logs. Audit Trace System I am sending this logs using AWS Log Driver to Cloud Watch Logs. Below is the pseudo code. If(Audit Logs) ...
0
votes
1answer
16 views

ECS scheduled task containerOverrides for entryPoint not working

I'm creating a scheduled ECS task in Terraform. When I try to override the container definition for the entryPoint, the resulting task does not use the overridden entryPoint. However, if I try to ...
0
votes
0answers
21 views

Is it possible to customize name of the log folder in S3 which is generated from AWS Lambda?

I have a lambda function setup in python which when run sends the logs to an S3 bucket. I am using the below tag in my handler to do so. OutputS3BucketName = 'name_of_bucket' The log folder ...
0
votes
1answer
22 views

How to write into a specific CloudWatch group

I have a cloudwatch log group named myTestLogGroup that has a log stream named myTestLogStream. I also have a lambda named myTestLambda with the following code: exports.handler = async () => { ...
1
vote
1answer
30 views

AWS Lambda function to check whether the site is available

I want to create an AWS Lambda function to check whether the site is available. I tried this function. 'use strict'; var url = require('url'); var target = 'https://www.google.com'; // Change this ...
0
votes
0answers
11 views

AWS Cloudwatch Set Logsteam name

I am setting custom cloud watch logs for my ec2 instance detailed analysis. I am using EC2 Systems Manager - Parameter Store. I am successfully getting Logs under Log Group name : IISLogs. Inside ...
0
votes
0answers
15 views

Log file not picked up by CloudWatch Logs Agent

I have set up CloudWatch Logs Agent on EC2 that runs Ubuntu. The installation ran successfully and here's my config file: [...path/test.log] datetime_format = %b %d %H:%M:%S file = ...path/test.log ...
0
votes
2answers
35 views

Would it be best to scale fewer larger instances, or more smaller instances?

what will be the best option to choose b/w less number of large instances or more number of the small instance when the performance is concerned, as the cloudwatch (load balancing and scaling) will be ...
0
votes
1answer
20 views

How can I change the time range of my aws cloudwatch dashboard permanently?

I want to set the time range of my dashboard permanently to 1 day. Unfortunately it will jump back to 3 hours when doing a browser refresh. Also each dashboard should have its own time range. So for ...
1
vote
0answers
22 views

How to spot unused files

I have a big system with 100 + files in php, we want to clean it up a bit by removing unused files. My idea was to create logs in each file, if the file is executed then send it's directory to ...
0
votes
1answer
33 views

How to fix InvalidAlgorithmParameterException connecting Spring Boot metrics and Cloudwatch

In Spring Boot I have set up Micrometer to pass metrics to Cloudwatch, however I am receiving a InvalidAlgorithmParameterException / the trustAnchors parameter must be non-empty error. I'm running ...
0
votes
0answers
18 views

How can a Lambda function enrich CloudWatch log alarm and add custom dimensions

I'm struggling to set up a Lambda to enrich alerts coming from CloudWatch logs. The idea behind this is to have a Cloudwatch log alert (from an EC2 instance) which fires a SNS that triggers a Lambda ...
2
votes
1answer
40 views

Trying to push custom metrics gathered by prometheus-operator and service monitors to AWS CloudWatch

I am running Service monitors to gather metrics from pods. Then with the help of the Prometheus operator, I am using serviceMonitorSelector to catch those metrics in Prometheus. I see those metrics in ...
1
vote
0answers
34 views

Creating a CloudWatch alarm based on a search expression

I'm attempting to the do the following: I have a DynamoDB global table which publishes the ReplicationLatency metric. I want to create an alarm on the aggregate of the ReplicationLatency metric ...
0
votes
1answer
20 views

Inject ECS Task ARN into AWS Cloudwatch Event Rule using Terraform

I am trying to create an AWS Cloudwatch event rule to send SNS email notifications when a container running a particular task finishes running successfully. I have scoured through the Terraform ...
0
votes
0answers
22 views

Not able to write logs to Cloud Watch Logs

I have one Windows EC2 Instance and I want to send a text file content to Cloud Watch Logs, but nothing gets sent to the Cloud Watch. Below is what I tried. Downloaded the CW Agent. And created the ...
0
votes
1answer
19 views

How to pass the cloudwatch target input as a parameter to Lambda function

I added a cloudwatch event target input in the json format { "config": us} And I tried to get this event as a input in my Lambda function as def lambda_handler(event, context): con = event[...
0
votes
1answer
21 views

How long are Cloudwatch Insights Query results retained?

When you use the AWS API to run a query against Cloudwatch logs, you get back a queryId. { "queryId": "string" } You can then call GetQueryResults using that query ID and retrieve results from ...
1
vote
2answers
49 views

Cloudwatch log store costing vs S3 costing

I have an ec2 instance which is running apache application. I have to store my apache log somewhere. For this, I have used two approaches: Cloudwatch Agent to push logs to cloudwatch CronJob to ...
0
votes
0answers
115 views

Making subscription filter to put CloudWatch Logs into Kinesis Data Firehose

I have a bunch of JSON logs in Amazon CloudWatch. Constantly, more logs are being streamed there via a Python executable. I would like to use Amazon Kinesis Data Firehose to move the logs to an ...
1
vote
2answers
56 views

How to write a cron schedule for US Market Hours

I am looking to schedule a Lambda function on AWS using CloudWatch to trigger every minute during US market hours (9:30am - 4pm EDT). I believe the only way to do this is using cron, and I'm not ...
0
votes
1answer
73 views

aws logs: The specified log group does not exist

I'm trying to grab logs from Cloudwatch with this CLI usage: cat cli-get-log-events.json { "logGroupName": "/aws/lambda/my-group", "logStreamName": "2019/03/30/[$LATEST]...
0
votes
0answers
7 views

Inventory of AWS resources with Grafana while using Alerts

So I'm struggling with a solution for a monitoring dashboard in Grafana: requirement is to show an aggregated graph of every EC2 running in my AWS accounts and show corresponding (cloudwatch) alerts. ...
0
votes
1answer
45 views

Not able to call start_query method

Not able to call start_query method I am trying to query cloudwatch Logs with the below code. But I got the below error TypeError: cloudwatchlogs.startQuery is not a function It seems the API ...
1
vote
1answer
24 views

Is it possible in AWS to subscribe to EC2 created/started/stopped/terminated events?

I have a utility in Lambda which does automatic DNS registration via an intelligent automated process. Instances that are created with a Name tag including XXXXXX and a autodns tag set to true will ...
0
votes
0answers
27 views

Validate that a CloudWatch Events ScheduleExpression value is valid?

I have an internal API, backed by CloudWatch Events, that lets developers schedule cronjobs. The user provided schedule expression must be a valid value for CloudWatch Events. Is there a utility/...
1
vote
1answer
29 views

Auditing AWS CloudWatch and SNS Notifications

I have a CloudWatch Alarm that sends a notification to an SNS topic, and I have a subscriber on that topic setup to receive those notifications. The problem is, the consumer listening on that topic ...
0
votes
1answer
20 views

Configuring CloudWatch alarm threshold and period in the console

In AWS CloudWatch, I have created a log metric filter to check a CloudWatch log group for a specific search term ("ERROR") and to consider an instance of this term to be a metric value of "1": I ...
0
votes
1answer
32 views

How to send Cloudwatch alarm to SNS based on Cloudwatch log metric filter using Terraform

I am testing a cloudwatch alarm filter (to be precise checking if lambda maxed out in memory) to send to SNS which then is sent to SQS queue. However, I do not see the filter appeared in logs. The ...
3
votes
1answer
25 views

How can I create a custom metric watching EFS metered size in AWS Cloudwatch?

Title pretty much says it all - Since the EFS metered size (usage) ist not a metric that I can use in Cloudwatch, I need to create a custom metric watching the last metered file size in EFS. Is ...
0
votes
2answers
28 views

How can i get total Memory in % from task manager and get the output of it in to a log file

I need a Powershell script that can get me total memory % from the Task Manager and get the output of it into a log file. Thanks.
1
vote
0answers
19 views

AWS CodeCommit: Repository Notifications vs Repository Triggers

Notifications: https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-repository-email.html Triggers: https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify.html The official ...
0
votes
1answer
40 views

POST custom metric with curl to cloudwatch

I want to log results of an api call to cloud watch. What I want to do is to post consume metrics to cloud watch. My architecture is designed to sit on elastic beanstalk, so I prefer to install as ...
0
votes
1answer
29 views

Accessing values in JSON array

I am following the instruction in the documentation for how to access JSON values in CloudWatch Insights where the recomendation is as follows JSON arrays are flattened into a list of field names ...
0
votes
0answers
19 views

Get count of array items in a JSON log file

I am working with the RDSOS log which is produced by my Aroura DB. It is a JSON file and has a flattened array of processList.0 ~ processList.n. I have been digging through the docs to no avail. Is ...