Skip to content

How do I update the platform version of my Elastic Beanstalk environment?

3 minute read
0

I want to update the environment platform of my AWS Elastic Beanstalk version. With the update, I want to apply security patches, resolve runtime compatibility issues, or migrate to a later platform branch.

Resolution

Note: If you experience application failures from runtime incompatibility or can't apply patches, then check whether your platform version is outdated. Later platform versions include operating system (OS) updates, security patches, runtime updates, and bug fixes.

Update your environment's platform version

For minor and patch updates within the same platform branch, update your environment's platform version. You can also use this method to revert to a earlier platform version in the same platform branch. For Elastic Beanstalk to automatically apply minor and patch version updates during a weekly maintenance window, configure managed updates. Managed updates happen with no downtime or capacity reduction. Elastic Beanstalk automatically cancels updates if the Amazon Elastic Compute Cloud (Amazon EC2) instances that run your application on the new version fail health checks.

For major updates that change the runtime, operating system (OS), or platform branch, perform a blue/green deployment to update your platform version. You must use this method to migrate off a deprecated or retired platform branch.

Address security vulnerabilities

If you identify common vulnerabilities and exposures (CVEs) in your platform version, then check whether a later platform version in your existing branch includes the fix. Check the platform release notes in the platform history to see each version's security patches.

Elastic Beanstalk platform versions include the OS and runtime packages that are available at the time of release. If the latest platform version doesn't include a CVE fix, then check whether Elastic Beanstalk includes the fix in a future platform release.

To apply individual package updates before Elastic Beanstalk releases a new platform version, configure the Amazon EC2 instances to install specific packages at launch.

Monitor the Elastic Beanstalk release notes for new platform releases and check the platform versions that are scheduled for retirement. It's a best practice to update your platform before your platform branch reaches end of life.

Troubleshoot missing packages on AL2023 instances

Amazon Linux 2023 (AL2023) has a smaller default package set than Amazon Linux 2 (AL2). If your application depends on packages that an earlier version of your OS included by default, then use .ebextensions configuration files to install the packages. Example:

packages:
  yum:
    php-zip: []
    php-gd: []

Note: AL2023 uses dnf instead of yum by default. However, yum still works as it acts as a symbolic link that points to dnf.

Related information

Migrating your Elastic Beanstalk Linux application to Amazon Linux 2023 or Amazon Linux 2

AWS OFFICIALUpdated 23 days ago