How to update Database Engine version on Elastic Beanstalk

0

I would like to know how to update the engine version of my Elastic Beanstalk environment.

The current version on RDS is 14.10, while the version on EBS is pointing to 14.08. This is causing some issues, such as the inability to clone the environment because 14.08 is not an allowed version for Postgres.

How can I update the engine version on EBS to match the one the RDS is really using?

  • please accept the answer if it was useful

2 Answers
0

Method 1: AWS Management Console

  1. Log in to the AWS Management Console.
  2. Navigate to the Elastic Beanstalk dashboard and select your application.
  3. Go to the environment that you want to update.
  4. Click on “Configuration”.
  5. In the ‘Database’ category, click on ‘Modify’.
  6. Change the DB engine version to your desired version (in your case, 14.10).
  7. Apply the changes. Elastic Beanstalk will update the RDS instance as part of the environment update.

Method 2: Using the Elastic Beanstalk CLI (EB CLI)

  1. Install the EB CLI on your machine if not already installed.
  2. Navigate to your project directory in the command line where your Elastic Beanstalk application is configured.
  3. Use the following EB CLI command to update the database engine version:
eb setenv RDS_ENGINE_VERSION='14.10'

Replace 14.10 with the version you wish to use.

  1. Deploy the changes using:
eb deploy

This command will apply the updated configuration to your environment.

Method 3: Modifying Configuration Files

  1. Navigate to your project directory.
  2. Open the .ebextensions directory (create one if it doesn’t exist).
  3. Create or modify a configuration file (e.g., db-update.config) to include the following:
option_settings:
  aws:rds:dbinstance:
    DBEngineVersion: "14.10"

Replace 14.10 with the desired version.

  1. Commit the changes to your version control system (if used) and deploy them using:
eb deploy

Important Considerations

  • Downtime: Changing the database engine version can cause downtime, as AWS needs to apply the new engine version and potentially restart your database instance.
  • Data Backup: Always ensure that you have recent backups before performing database upgrades.
  • Testing: Consider testing the engine upgrade in a separate environment before applying changes to your production environment to avoid unexpected issues.
profile picture
EXPERT
answered a month ago
0

*Hello,

To update the database engine version on Elastic Beanstalk (EBS) to match the version on your RDS instance, you'll need to modify your Elastic Beanstalk environment's configuration. Here's a step-by-step guide:

  1. Identify Available Engine Versions: First, identify the available engine versions for your database engine (PostgreSQL in your case). You can find this information in the AWS documentation or by checking the console.

  2. Update Elastic Beanstalk Configuration: Log in to the AWS Management Console and navigate to the Elastic Beanstalk service. Select your environment.

  3. Modify Configuration: In the configuration section of your environment, locate the database configuration settings. Look for the option to specify the database engine version.

  4. Select the Correct Engine Version: Choose the PostgreSQL engine version that matches the version used in your RDS instance (14.10 in your case).

  5. Apply Configuration Changes: After selecting the correct engine version, save your configuration changes. Elastic Beanstalk will automatically apply these changes to your environment.

  6. Verify Update: Once the configuration changes have been applied, verify that your Elastic Beanstalk environment is using the updated database engine version. You can check this in the environment dashboard or by accessing your application and verifying its behavior.

  7. Test Environment: It's a good practice to thoroughly test your environment after making configuration changes to ensure that everything is functioning correctly.*

profile picture
answered 25 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions