amazon-cloudwatch

CloudWatch alarm to SNS in different region

走远了吗. 提交于 2019-12-21 13:40:14
问题 I'm trying to notify an SNS topic from a CloudWatch alarm that's in a different region. The reason is that I want SMS alerting, which isn't available in the region where my services are. If I enter the ARN of the subscription and save the changes in the console, I get "There was an error saving the alarm. Please try again." Trying again does not help. Using a topic in the local region does work, but that's not what I need. Is there a way to notify a topic in a different region? If not, is

Unable to define Math Expression for Cloudwatch Alarm in a Cloudformation Template

怎甘沉沦 提交于 2019-12-21 05:09:31
问题 Recently AWS announced that Cloudwatch alarms can use Math Expressions on metrics. I decided to create an alarm that compares the SUM of 2 single metrics with a given threshold. This means that according to AWS documentation my expression should be SUM([m1,m2]), where m1 and m2 are 2 single metrics. I also decided to implement this idea using a cloudformation template (in yaml). Here's the Cloudwatch alarm definition: BillingAlarmExpression: Type: AWS::CloudWatch::Alarm Properties:

Send an SMS for a cloudwatch Alarm outside of us-east?

流过昼夜 提交于 2019-12-21 02:43:33
问题 It looks like AWS does not provide SMS as a protocol for SNS topic subscribers outside of US East. I wanted to hook up my CloudWatch alarms and receive text messages when something breaks but cannot send them to SMS. 回答1: YES! After some digging I was able to get this to work. It's a little more complicated than just selecting a topic or inputing an alarm but it works great! The key to the solution was using AWS's lambda functions! The flow of data is such: > Alarm triggered > -> Push

Invoke AWS Lambda function only once, at a single specified future time

好久不见. 提交于 2019-12-20 12:20:36
问题 I want to be able to set a time to invoke an AWS Lambda function, then have that function be invoked then and only then. For example, I want my Lambda function to run at 9:00pm on December 19th, 2017. I don't want it to repeat, I don't want it to invoke now, just at 9:00pm on the 19th. I understand that CloudWatch provides Scheduled Events, and I was thinking that when a time to schedule this reminder for is inputted, a CloudWatch Scheduled Events is created to fire in that amount of time

How do I create an Alarm to detect DynamoDb limits have reached a certain percent and then increase it

為{幸葍}努か 提交于 2019-12-19 19:50:27
问题 I'm writing a web application that has steadily increasing traffic through the day. I'd like to create an Alarm that can detect if my read / write limits have reached a certain percentage (like 80%), and then increase that limit. I will then decrease it again at midnight. I've tried creating an Alarm - "Average" seems a bit useless and is always 1.0. "Sum" is more useful so I assume i should use this. I also assume i should use Consumed Write/Read Capacity at the metric name. Problems: Sum

aws lambda Unable to import module 'lambda_function': No module named 'requests'

走远了吗. 提交于 2019-12-19 02:49:14
问题 I have recently started to use AWS Lambda to use triggers against some python code I have written. I currently have 2 lambda functions, both of which have been created with ZIP files. The second one I created is supposed to test the trigger events. This is for testing purposes so I'm using the best code of all: def lambda_handler(event, context): print ("Hello World") However, I get this error back: Response: { "errorMessage": "Unable to import module 'lambda_function'" } Request ID:

AWS SNS delivery status

偶尔善良 提交于 2019-12-17 21:17:10
问题 I am new in Aws, I am using Aws SNS to send notification, i am sending notifications to different topic not to endpoint. This 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

How to send Ec2 logs to S3 and then monitoring it using Cloudwatch

馋奶兔 提交于 2019-12-14 03:44:34
问题 I am going through a situation where i do not know which is the correct way and how to do it. My Aim is : ec2 Logs should be uploaded in S3 and logs should be reviewed and monitored using cloudwatch for any unwanted events. Scenario 1: 1) Upload ec2 logs to s3 and then to cloudwatch for security review and monitoring Scenario 2: 1) Upload ec2 logs to cloudwatch and send data then s3 Scenario 3: 1) Upload ec2 logs to both s3 and cloudwatch simultaneously Please help me to achieve what is

Query metrics for multiple instances from AWS Cloudwatch

て烟熏妆下的殇ゞ 提交于 2019-12-14 02:51:44
问题 I'm trying to fetch CPUUtilization Statistics for multiple instances at once to avoid API rate quota errors. &MetricName=CPUUtilization&Namespace=AWS%2FEC2&Statistics.member.1=Sum&Statistics.member.2=SampleCount&Statistics.member.3=Maximum&Statistics.member.4=Minimum&Period=60&StartTime=2015-03-16T18%3A11%3A15&EndTime=2015-03-16T19%3A11%3A15&Dimensions.member.1.Name=InstanceId&Dimensions.member.1.Value=ABC&Dimensions.member.2.Name=InstanceId&Dimensions.member.2.Value=CDE The response contains

How can I enable CloudWatchLogs in an ElasticBeanstalk environment running Windows?

一曲冷凌霜 提交于 2019-12-13 15:25:10
问题 I have a webservice that spools out data to a flat file. In non-EC2, raw Windows instances we use the EC2Config service to pump our log files and some performance counters to CloudWatch (See here: http://blogs.aws.amazon.com/application-management/post/Tx1KG4IKXZ94QFK/Using-CloudWatch-Logs-with-Amazon-EC2-Running-Microsoft-Windows-Server ). How can I configure my application and ElasticBeanstalk to enable CloudWatch Logging in my Windows Instance? 回答1: I use an .ebextensions file for this