← Back to list

AWS Aurora Serverless v1 to v2 Upgrade: Key Configuration Changes, v1 vs v2 Comparison, and…

Learn how to upgrade from Aurora Serverless v1 to v2 with a detailed step-by-step migration strategy, configuration changes.

Umair Khan · 2025-01-13 09:09 · 2 claps · 3.0 min read
#aws-rds-upgrade #aurora-serverless-v2 #cloudformation
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

Aurora Serverless v2

Aurora Serverless v2

AWS Aurora Serverless v1 to v2 Upgrade: Key Configuration Changes, v1 vs v2 Comparison, and Migration Guide with CloudFormation

Learn how to upgrade from Aurora Serverless v1 to v2 with a detailed step-by-step migration strategy, configuration changes.

When transitioning from Aurora Serverless v1 to v2 in CloudFormation or any Infrastructure-as-Code (IaC) setup, there are significant configuration changes you need to implement to ensure proper deployment and functionality in v2. Below are the key changes to keep in mind:

Key Configuration Changes in Aurora Serverless v2 vs v1

Engine Mode and Version Differences

v1: Aurora Serverless operates without an explicit DB instance.

v2: Requires an explicit AWS::RDS::DBInstance resource with the “db.serverless” class.

v1: Aurora Serverless v1 uses the default MySQL 5.6 or 5.7 engine.

v2: Requires MySQL 8.0 (8.0.mysql_aurora.3.08.0 or higher) for compatibility and autopause features.

AutoPause and Scaling Configuration: v1 vs v2

v1: You can configure AutoPause to pause the database after a set period of inactivity (e.g., SecondsUntilAutoPause).

v2: AutoPause is no longer available. Instead, SecondsUntilAutoPause works only if the minimum capacity is set to zero and the engine version is compatible with MySQL 8.0.

Deprecated Parameters

v1: Older parameters from v1 may no longer be valid in v2.

v2: Updated parameters must be referenced.

Sample CloudFormation Template for Aurora Serverless v2 Setup

Below is a sample CloudFormation template (YAML) that defines the resources necessary to set up an Aurora Serverless v2 cluster. Ensure the following changes as per the v2 configuration:

  • Updated Engine Version: Ensure the engine version is set to MySQL 8.0 (8.0.mysql_aurora.3.08.0).
  • Serverless v2 Configuration: Update the DB instance class to “db.serverless” and adjust the scaling configuration as needed.
Transform: AWS::Serverless-2016-10-31
Resources:
  RDSDBParameterGroup: 
    Type: "AWS::RDS::DBParameterGroup"
    Properties:
      Description: "Aurora DB Instance Parameter Group"
      Family: aurora-mysql8.0
      Parameters:
        log_error_verbosity: 1
  RDSDBClusterParameterGroup:
    Type: "AWS::RDS::DBClusterParameterGroup"
    Properties:
      Description: "Aurora DB Cluster Parameter Group"
      Family: aurora-mysql8.0
      Parameters:
        lower_case_table_names: 1
        binlog_format: ROW
  RDSDBInstance:
    DependsOn:
      - RDSCluster
      - RDSDBParameterGroup
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: "aurora-mysql"
      DBClusterIdentifier: !Ref RDSCluster
      PubliclyAccessible: 'true'
      DBInstanceClass: "db.serverless"
      DBParameterGroupName: #####
      DeleteAutomatedBackups: false
  RDSCluster:
    Type: AWS::RDS::DBCluster
    Properties: 
      MasterUsername: #####
      MasterUserPassword: ####
      DatabaseName: #####
      Engine: "aurora-mysql"
      EngineMode: "provisioned"
      ServerlessV2ScalingConfiguration:
        - MaxCapacity: 16
          MinCapacity: 0
          SecondsUntilAutoPause: 300
      AvailabilityZones: ######
      BackupRetentionPeriod: ####
      DBClusterParameterGroupName: #####
      DeletionProtection: #####
      EnableHttpEndpoint: True
      EngineVersion: "8.0.mysql_aurora.3.08.0"
      UseLatestRestorableTime: True
      VpcSecurityGroupIds: #####

Step-by-Step Migration Strategy for Aurora Serverless v1 to v2

Transitioning from Aurora Serverless v1 to v2 involves leveraging snapshots, provisioning intermediate clusters, and carefully upgrading the database engine. Here’s a step-by-step approach to ensure a smooth migration:

Step 1: Create a Snapshot of the Aurora Serverless v1 Cluster

  1. Log into the AWS Management Console or use the CLI.
  2. Create a snapshot of your Aurora Serverless v1 cluster.
  3. If you need to share the snapshot across AWS accounts:
  • Re-encrypt the snapshot with a custom KMS key (Snapshots encrypted with the default RDS key cannot be shared).
  • Alternatively, export the snapshot to S3, then restore it in the target account.

Step 2: Launch a Provisioned Aurora Cluster

Use the snapshot from Step 1 to create a provisioned Aurora cluster. This step is crucial because Aurora Serverless v1 does not support direct upgrades to MySQL 8.0 and requires a provisioned cluster for the intermediate upgrade process.

Step 3: Upgrade the Provisioned Cluster to MySQL 8.0

  1. Modify the provisioned cluster’s settings:
  • Select the engine version 8.0.mysql_aurora.3.08.0 or higher.
  • Ensure the instance type is .medium or higher (v2 upgrades are not supported on .small instance types).
  1. Apply the modifications and monitor the upgrade process.
  2. Validate the database’s functionality and compatibility post-upgrade.

Step 4: Create a Snapshot of the Upgraded Cluster

After confirming the upgraded cluster is fully functional, create a snapshot. Ensure encryption settings are correct for your use case or sharing needs:

  • Use a custom KMS key for sharing across accounts.
  • Export to S3 if sharing via snapshots is not feasible.

Step 5: Launch Aurora Serverless v2 from the Snapshot

Use the upgraded snapshot to create an Aurora Serverless v2 cluster:

  • Configure the RDS instance with “db.serverless” in the settings.
  • Ensure the minimum capacity is set to zero for cost efficiency during idle periods.

Conclusion

Migrating from Aurora Serverless v1 to v2 requires updating several key configurations in your CloudFormation templates (or any IaC tool). By following the changes outlined above, you can ensure that your database setup is fully compatible with Aurora Serverless v2’s new features and capabilities, such as the “db.serverless” instance class, upgraded engine versions, and revised scaling parameters.


메타데이터
post_id
702dbf899bfe
slug
aws-aurora-serverless-v1-to-v2-upgrade-key-configuration-changes-v1-vs-v2-comparison-and-702dbf899bfe
url
https://medium.com/@umairf17iiui/aws-aurora-serverless-v1-to-v2-upgrade-key-configuration-changes-v1-vs-v2-comparison-and-702dbf899bfe
canonical_url
https://medium.com/@umairf17iiui/aws-aurora-serverless-v1-to-v2-upgrade-key-configuration-changes-v1-vs-v2-comparison-and-702dbf899bfe
author_url
https://medium.com/@umairf17iiui
status
ok
fetched_at
2026-07-31 17:49:45