Can serverless be used to to create RDS instance?


Currently we are using Serverless framework to update our dev/test environments, and manage our environments manually. Eg. each time we create a new environment, we manually create Elastic Beanstalk application & RDS instance. Is it possible to automate all this using serverless script? or cloudformation?


With CloudFormation that’s pretty straight forward. All you need is to define an AWS::RDS::DBInstance. AWS also provides some example templates for that:

As you can include CloudFormation resources in Serverless, you can add that directly to your serverless.yml so it gets deployed by Serverless without the need to use a separate CloudFormation deployment:

More complete example of all available options for RDS (including Aurora):

Leave a Reply