amazon-cloudwatch

AWS Cloudwatch Event Rule - Invoke Lambda - with Parameter

那年仲夏 提交于 2021-02-19 08:34:19
问题 I am using AWS Clouwatch Event Rule to invoke a python lambda function based on Cron Schedule which is working fine.Now can I pass parameter into this lambda function from cloudwatch even rule using AWS Cloudformation? Could you please guide? Please see below my cfn template : Step1 : parameter.Schedule=cron(0 21 ? * * *) Step 2: "Schedule": { "Description": "Schedule for the Lambda function (cron or rate)", "Type": "String" }, Step 3: "funcInvokeRule": { "Type": "AWS::Events::Rule",

When does AWS CloudWatch create new log streams?

主宰稳场 提交于 2021-02-18 05:05:53
问题 AWS CloudWatch has Log Groups and Log streams. A log group seems reasonable to me: Each product (e.g. each Lambda function, each Sagemaker endpoint) has its own log group. But then there are log streams. When does AWS CloudWatch create new log streams? Can I search all log streams of a log group? 回答1: From the AWS Cloudwatch documentation you can see that a log stream is created each time the logs come from a different event source. In case of Lambda, it's one stream per Lambda container

When does AWS CloudWatch create new log streams?

人盡茶涼 提交于 2021-02-18 05:05:33
问题 AWS CloudWatch has Log Groups and Log streams. A log group seems reasonable to me: Each product (e.g. each Lambda function, each Sagemaker endpoint) has its own log group. But then there are log streams. When does AWS CloudWatch create new log streams? Can I search all log streams of a log group? 回答1: From the AWS Cloudwatch documentation you can see that a log stream is created each time the logs come from a different event source. In case of Lambda, it's one stream per Lambda container

AWS Lambda Cron Schedule Error

穿精又带淫゛_ 提交于 2021-02-17 06:33:05
问题 I have several Lambda Functions that are on a schedule and those are working without any issues. However, I have a onetime job that I am trying to set up for an existing function and am getting an error when I am creating the new rule: Details: Parameter ScheduleExpression is not valid.. I need this to run on Monday September 26th 2016 at 14:30 hours UTC. Here are all of the variations I have tried: cron(30 14 26 SEP ? 2016) cron(30 14 26 9 ? 2016) cron(30 14 26 SEP ?*) cron(30 14 26 9 ? *)

Does AWS Lambda Store Last Run Time?

Deadly 提交于 2021-02-17 03:25:13
问题 I am trying to pass a unix timestamp into API get request as a parameter to another system to grab data. The parameter needs to be the last time the AWS Lambda ran. I need to somehow store the last time the AWS lambda function has ran into maybe an s3 bucket and also recover that timestamp. So I can pass that value along into the next run. Anyone have any ideas on how to do something like this? 回答1: Lambda does not store any last run time between invocations (especially as its possible there

AWS SNS stopped delivering messages

∥☆過路亽.° 提交于 2021-02-08 11:34:31
问题 I tried sending SMS from AWS SNS API through JAVA which worked for two days then suddenly stopped delivering messages but the response from API is 200 ok with a proper message ID without delivering messages. I am trying to post the request through postman to get more clarity of the issue but cannot find any collection or request signature. ` public class SNS { public static void sendSMS(String phoneNumber,String message) { BasicAWSCredentials basicCred = new BasicAWSCredentials("XXXXXXXXXXX",

Awslogs logging driver issue - NoCredentialProviders: no valid providers in chain

随声附和 提交于 2021-02-08 08:20:53
问题 Docker compose addition for logging: app: logging: driver: awslogs options: awslogs-region: eu-west-3 awslogs-group: myappLogGroup I have added my AWS credentials to my mac using the aws configure command and the credentials are stored correctly in ~/.aws/credentials. I am using docker desktop 2.2.0.4. When I run docker-compose up I get the following error: ERROR: for app Cannot start service app: Failed to initialize logging driver: NoCredentialProviders: no valid providers in chain.

Awslogs logging driver issue - NoCredentialProviders: no valid providers in chain

时光怂恿深爱的人放手 提交于 2021-02-08 08:18:16
问题 Docker compose addition for logging: app: logging: driver: awslogs options: awslogs-region: eu-west-3 awslogs-group: myappLogGroup I have added my AWS credentials to my mac using the aws configure command and the credentials are stored correctly in ~/.aws/credentials. I am using docker desktop 2.2.0.4. When I run docker-compose up I get the following error: ERROR: for app Cannot start service app: Failed to initialize logging driver: NoCredentialProviders: no valid providers in chain.

Terraform: CloudWatch Event that notifies SNS

别等时光非礼了梦想. 提交于 2021-02-08 07:21:59
问题 I'm learning TF and trying to apply an infrastructure that creates: a simple lambda function an SNS topic get that lambda to subscribe the SNS topic a Cloud Watch Event that publishes a message to the topic at some interval a Cloud Watch Log Group to check if the lambda gets notified by the SNS The lambda permission to allow calls from SNS I'm able to apply that successfully. The infrastructure seems perfectly fine (it has the same aspect when I create that myself through the visual aws