question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error starting rds instance RDS:xxx (Shape is missing required key 'type': OrderedDict([('members', OrderedDict([('SourceRegion', OrderedDict([('shape', 'String')

See original GitHub issue

RDS instances are not starting after stopping successfully with the Instance Scheduler:

2021-03-26 - 08:00:28.186 - ERROR   : Error starting rds instance RDS:xxx
(Shape is missing required key 'type': OrderedDict([('members', OrderedDict([('SourceRegion', OrderedDict([('shape', 'String'),
('documentation', '<p>The ID of the region that contains the source for the db instance.</p>')]))]))]))

We are using the aws-instance-scheduler version v1.3.3 (SO0030).

CloudFormation parameters:

  • DefaultTimezone: America/Sao_Paulo
  • LogRetentionDays: 1
  • MemorySize: 1024
  • Regions: us-east-2
  • ScheduleLambdaAccount: Yes
  • ScheduleRdsClusters: Yes
  • ScheduledServices: Both
  • SchedulerFrequency: 1
  • SchedulingActive: Yes
  • SendAnonymousData: Yes
  • StartedTags: -
  • StoppedTags: -
  • TagName: Schedule
  • Trace: Yes
  • UseCloudWatchMetrics: Yes

We created the period and schedule using the scheduler-cli tool running the following commands:

scheduler-cli create-period --name cwb-office-hours --weekdays mon-fri --begintime 06:00 --endtime 20:00 --stack Instance-Scheduler
scheduler-cli create-schedule --name cwb-office-hours --periods cwb-office-hours --stack Instance-Scheduler

DynamoDB ConfigTable: Config Period Schedule

We are using the tag Schedule with the value cwb-office-hours with RDS Instances (MySQL, PostgreSQL) and RDS Clusters (Aurora MySQL).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
esaporskicommented, Apr 6, 2021

It worked 😃 I checked the logs and it is behaving a little bit erratically though:

2021-04-06 - 09:00:32.886 - DEBUG   : Desired state for instance from schedule "cwb-office-hours" is stopped,
last desired state was unknown, actual state is running 

Thanks a lot, @gockle!

1reaction
gocklecommented, Apr 5, 2021

@esaporski Is it possible to update the lambda code and try a workaround? the file rds_service.py in the ./lambda/schedulers folder, update the method start_instances(…) by removing the return statement at the end. This is a know issue, when there is an error in one of the instances the code exits the method without completing the start for all the instances in the list. We will be adding a change to our next release to address this issue, but let me know if the workaround resolves the issue and starts all the instances.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error starting rds instance RDS:xxx (Shape is missing required ...
Error starting rds instance RDS:xxx (Shape is missing required key 'type': OrderedDict([('members', OrderedDict([('SourceRegion', OrderedDict([('shape', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found