Aurora Serverless

has anyone tried it yet ?

is it possible to completely have serverless.yml create a serverless aurora database and define tables etc…

and to also have option to create, drop-create, update the schema etc ? any good pointers to examples ?

1 Like

I’ve been playing around with some stuff to get this happening. At the moment I’ve managed to create and delete an aurora serverless instance. Checkout https://github.com/nibynool/serverless-aurora

For migrations I’m trying to work with serverless-pg-migrations (available through NPM) which appears to allow migrations for any DB supported by sequelizejs

My biggest issue with Aurora Serverless is that it is inaccessible from outside AWS. With this in mind I’m trying to set-up some sort of on-demand bastion host to make sure my migrations work as expected, but it should be straight forward to manually create a bastion host if you want to verify your DB from outside AWS.

(sorry for the lack of links, as a new user I’m restricted from posting too many in a single post)

CFN now supports the EngineMode property, set it to serverless while creating a standard RDS/aurora instance to end up with aurora serverless.

Should look something like this.

ServerlessRDSCluster:
  DependsOn: ServerlessStorageSecurityGroup
  Type: AWS::RDS::DBCluster
  DeletionPolicy: ${self:custom.dbDeletionPolicy}
  Properties:
    Engine: aurora
    EngineMode: serverless
    Port: 3306
    DatabaseName: ${self:provider.environment.RDS_DB}
    MasterUsername: ${self:provider.environment.RDS_USER}
    MasterUserPassword: ${self:provider.environment.RDS_PWD}
    VpcSecurityGroupIds:
      - Ref: ServerlessStorageSecurityGroup
    DBSubnetGroupName:
      Ref: ServerlessRDSSubnetGroup
    Tags:
      - Key: Name
        Value: "${self:custom.nameSpace} Read Models"

More data here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-enginemode

1 Like