amazon-cloudwatch

Amazon SNS Service Push Notification delivered or not

一曲冷凌霜 提交于 2019-12-25 16:47:39
问题 I am using Aws SNS to send notification, and sending notifications to different topics and is working perfectly. When i publish notification, i got array like object(Aws\Result)#84 (1) { ["data":"Aws\Result":private]=> array(2) { ["MessageId"]=> string(36) "************-7a29-591f-8765-************" ["@metadata"]=> array(4) { ["statusCode"]=> int(200) ["effectiveUri"]=> string(40) "https://sns.ap-southeast-1.amazonaws.com" ["headers"]=> array(4) { ["x-amzn-requestid"]=> string(36) "***********

Disable CloudWatch to monitor logs for Lambda function

旧时模样 提交于 2019-12-25 02:23:15
问题 Is there any possible way to disable CloudWatch to log Lambda Function's events? If possible, then what are the steps to do this. 回答1: As per my understanding log output is generated by as a default behavior if you do any tests with lambda function. However, the logs are stored in CloudWatch log group only if your lambda role has permission to write to CloudWatch. 来源: https://stackoverflow.com/questions/51166504/disable-cloudwatch-to-monitor-logs-for-lambda-function

query cloudwatch logs for distinct values using boto3 in python

痴心易碎 提交于 2019-12-24 18:49:28
问题 I have a lambda function that writes metrics to Cloudwatch . While, it writes metrics, It generates some logs in a log-group. INFO:: username: simran+test@abc.com ClinicID: 7667 nodename: MacBook-Pro-2.local INFO:: username: simran+test2@abc.com ClinicID: 7669 nodename: MacBook-Pro-3.local INFO:: username: simran+test@abc.com ClinicID: 7668 nodename: MacBook-Pro-4.local INFO:: username: simran+test3@abc.com ClinicID: 7667 nodename: MacBook-Pro-5.local INFO:: username: simran+test3@abc.com

Monitor memory usage for auto scaling group

本小妞迷上赌 提交于 2019-12-24 13:09:30
问题 I have an auto scaling group of instances in Amazon cloud and I want to monitor some metrics across all instances in auto-scaling group. For example it would be nice to have a metric which reports the maximum memory usage across all instances that belong to the group. Thus I would have an opportunity to detect memleaks. I know that I can monitor a group via load balancer's metrics, but I don't have one and don't want to. Group metrics described on this page http://docs.aws.amazon.com/cli

AWS Lambda schedule a delayed execution to run once

一曲冷凌霜 提交于 2019-12-24 07:56:53
问题 I have an API Gateway with Lambdas behind, for some of the endpoints I want to schedule an execution in the future, to run once, for example the REST call was made at T time, I want that lambda to schedule an execution ONCE at T+20min. The only solution I found to achieve this is to use boto3 and Cloudwatch to setup a cron at the moment the REST call was made, send an event with the payload, then when the delayed lambda runs, it removes the rule. I found this very heavy, is there any other

AWS Cloudformation - Invocation of Lambda by Rule Event failed

旧时模样 提交于 2019-12-24 04:04:07
问题 I tried to create a template in cloudformation, having a lambda function triggered by one cloudwatch event rule(every 10minutes). In the cloudwatch graph, I can see the invocations but also all failedinvocation. I believe it is an problem of role of the rule but I can't figure out it. Here is my template that you can see in the cloudformation designer. { "AWSTemplateFormatVersion": "2010-09-09", "Metadata": { "AWS::CloudFormation::Designer": { "d1498a15-7d12-4ec9-bba6-3ba163574a10": { "size":

Why is ApproximateAgeOfOldestMessage in SQS not bigger than approx 5 mins

房东的猫 提交于 2019-12-24 03:34:09
问题 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 an application bug, leading to an exception and no confirmation (deletion) of the message. The message is later retried (this is desirable) presumably after the visibility timeout has elapsed (again default values are in use), we have not

Can I include Custom data in a AWS Cloudwatch Alert?

こ雲淡風輕ζ 提交于 2019-12-24 00:59:07
问题 I'm using AWS Cloudwatch to monitor application log files on my AWS EC2 instances. Is there a way to include Custom data (I.E. stack trace) in the Cloudwatch Alert when it is triggered by the metric I define? 回答1: I ended up routing the alert event to a REST service I wrote rather than to the SNS notification group. The web service uses the "event name" and timestamp to generate a custom notification. It pulls diagnostic information from several services, including our ELK stack, and includes

Lambda log and CloudWatch PutLogEvents limit

血红的双手。 提交于 2019-12-23 22:26:19
问题 I know Lambda calls PutLogEvents to log messages internally. CloudWatch has a limit on PutLogEvents . PutLogEvents: 5 requests per second per log stream. I want to know Could Lambda log stream also be throttled by PutLogEvents ? If so, how to know if a Lambda log stream is throttled or not? Any error message in the log stream? When does Lambda call PutLogEvents ? for example, at the end of a Lambda function, it calls PutLogEvents once. when flushing buffer(stdout), it calls PutLogEvents all

Amazon Cloudwatch log filtering - JSON syntax

泄露秘密 提交于 2019-12-23 19:37:25
问题 I have an AWS Lambda function which is logging errors. Errors are logged as such: console.error(err); I'm trying to create a Cloudwatch filter which uses their JSON log filtering syntax: { $.errorType = "ValidationException" } I can see the error in the log 2015-11-24T20:26:02.852Z 76800706-2d78-45ed-9068-46ccccafe6af { "errorMessage": "1 validation error detected: Value '[]' at 'xxxxxx' failed to satisfy constraint: Member must have length greater than or equal to 1", "errorType":