Skip to content

Aws scheduler doesn't seem working

0

Hi,

I'm following this guide to add schedule to start and stop my ec2 instances https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/solution-overview.html

I tried the default tag running and stopped who works

But when i use my tag "company-office-hours" it don't work

{
  "type": {
    "S": "schedule"
  },
  "name": {
    "S": "company-office-hours"
  },
  "description": {
    "S": ""
  },
  "periods": {
    "SS": [
      "office-hours",
      "office-hours-lunch"
    ]
  },
  "timezone": {
    "S": "Europe/Paris"
  }
}

{
  "type": {
    "S": "period"
  },
  "name": {
    "S": "office-hours"
  },
  "begintime": {
    "S": "08:00"
  },
  "description": {
    "S": "Office hours"
  },
  "endtime": {
    "S": "20:00"
  },
  "weekdays": {
    "SS": [
      "mon-fri"
    ]
  }
}

{
  "type": {
    "S": "period"
  },
  "name": {
    "S": "office-hours-lunch"
  },
  "begintime": {
    "S": "14:00"
  },
  "description": {
    "S": "Office hours"
  },
  "endtime": {
    "S": "12:00"
  },
  "weekdays": {
    "SS": [
      "mon-fri"
    ]
  }
}

Thanks

asked 3 years ago979 views
1 Answer
0
  1. Verify that the schedule is set up correctly: Make sure that the schedule you set up, "company-office-hours", is configured correctly. Double-check that the periods and timezone are set up correctly. Also, verify that the periods "office-hours" and "office-hours-lunch" are set up correctly, and that the days of the week and times match what you expect.

  2. Check the CloudWatch events: Make sure that the CloudWatch events are set up correctly and that they're triggering the correct Lambda function. You can check this by going to the CloudWatch console, selecting "Events" from the left-hand menu, and verifying that the events are present.

  3. Check the Lambda function: Make sure that the Lambda function is working correctly. You can check this by going to the Lambda console, selecting the function, and looking at the CloudWatch logs for any errors.

  4. Check the IAM role: Make sure that the IAM role associated with the Lambda function has the correct permissions to start and stop the instances. You can check this by going to the IAM console, selecting "Roles" from the left-hand menu, and verifying that the role has the correct permissions.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.