Where the MySQL Event Scheduler mechanism works for both the MySQL and Aurora Cluster RDS services. It seemed not to work after migrating our applications to Aurora Serverless clusters.
The event_scheduler parameter was still set in the parameter group:
DBClusterParameterGroup:
Type: AWS::RDS::DBClusterParameterGroup
Properties:
Description: !Sub 'terra10-${ENV}-parametergroup'
Family: aurora5.6
Parameters:
event_scheduler: 'ON'
Tags:
- Key: Name
Value: !Sub 'terra10-${ENV}-parametergroup'
But the database did not seem to pick up the setting:
SELECT @@global.event_scheduler;
"OFF"
Then we noticed this post which told us we are not alone. It seems a limitation when using the Aurora Serverless MySQL engine, however not well documented.
Luckily we had a AWS Lambda stack in place using the Serverless framework, so decided to move the current MySQL events to scheduled Lambda functions. With the help of the Serverless Schedule event this was incredible easy:
functions:
aggregate:
handler: aggregate.handler
events:
- schedule: rate(4 hours)
So keep this in mind if your start looking into Aurora Serverless for your applications.
Hope it helps!