Stored Procedures and Events Aurora via CloudFormation

407 views Asked by At

I use CloudFormation's AWS::RDS::DBCluster resource to create my Aurora MySQL database cluster.

My question is, has anyone created stored procedures as well as events in Aurora MySQL via CloudFormation? Is that even possible?

Delivering these via CloudFormation would allow me to recreate the infrastructure without deploying the stored procedures and events separately.

1

There are 1 answers

1
wjordan On BEST ANSWER

There's no way to configure stored procedures and events with the AWS::RDS::DBCluster CloudFormation resource directly.

My suggestion would be to provision an AWS::EC2::Instance containing a UserData script that installs the mysql client, then executes the contents of a user-provided MySQL script creating events/stored-procedures on the newly-created DB instance.