Metabase application settings won't persist after a reboot

Currently running Metabase with the Community Edition using Elastic Beanstalk in AWS. I have followed the steps on this guide and have managed to deploy the application successfully. However, I think I made a mistake because I did not create a RDS cluster separately in AWS, but I preferred the option to do so within Elastic Beanstalk because the configuration steps were easier. From my understanding, once you do this, Metabase shouldn't be using the embedded database using H2, and instead use the RDS cluster you just created with Elastic Beanstalk, so it should persist through several instance restarts. From my testing, this does not seem to be the case, and I would like to know if there are any steps I have to do to achieve this with my current configuration, or if I should redeploy the application and just follow the steps to create a RDS cluster and then connect this cluster using environment variables within Elastic Beanstalk.

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.15+10",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.15",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.15+10",
    "os.name": "Linux",
    "os.version": "4.14.281-212.502.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "h2"
    ],
    "hosting-env": "elastic-beanstalk",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-06-27",
      "tag": "v0.43.4",
      "branch": "release-x.43.x",
      "hash": "61cc28e"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Please create a separate RDS cluster and connect Metabase via environment variables, the one that Elastic Beanstalk creates is not a good fit for any production deploymet

Hello and thank you very much for your reply. Just to clarify: after doing this, Metabase will stop using the included H2 database and will start using the one I will create via RDS, correct?

Yes, you can check that by yourself by checking the diag info on:

"application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },

it should say MySQL or Postgres depending on what you choose

Thank you, I redeployed my application and this time I created a separate RDS cluster, connected it with environment variables and now everything's working fine. The output of the application-database-details is now as follows:

"metabase-info": {
    "databases": [
      "mysql"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "13.4"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.3.2"
      }
    },