Profile Applicability:

  • Level 1

Description:

Elastic Beanstalk is a managed service that automatically handles the deployment, scaling, and monitoring of applications. Managed platform updates are an essential feature of Elastic Beanstalk, as they ensure that the platform is always running the latest stable version with bug fixes, security patches, and new features. Enabling managed platform updates ensures that your environment is kept up to date with the latest platform improvements without manual intervention, which helps to enhance security, performance, and overall application reliability.

Rationale:

Enabling managed platform updates for Elastic Beanstalk environments ensures that:

  • Security Patches: The platform is automatically updated with the latest security patches to mitigate vulnerabilities and risks.

  • Bug Fixes: It helps resolve issues by applying the latest bug fixes and improvements to the environment.

  • Performance Enhancements: Updates can include optimizations that enhance the performance of applications hosted on Elastic Beanstalk.

  • Reduced Management Overhead: Managed updates reduce the need for manual intervention, ensuring that environments are always running with the latest platform version.

Impact:

Pros:

  • Security: Regular updates reduce the risk of vulnerabilities by applying security patches automatically.

  • Convenience: Reduces the management burden by automating the process of keeping the environment updated.

  • Stability: Updates ensure that the platform is running the most stable version, improving application reliability.

Cons:

  • Potential Disruptions: In rare cases, a platform update might introduce changes that could affect your application or its compatibility with the new version.

  • Performance Impact: During updates, there may be a temporary performance impact or service interruption.

Default Value:

By default, Elastic Beanstalk environments may have managed platform updates disabled, and updates must be explicitly enabled to automatically apply the latest updates to the environment

Pre-requisites:

  • IAM Permissions:

    • elasticbeanstalk:DescribeEnvironmentConfiguration

    • elasticbeanstalk:UpdateEnvironment

  • Elastic Beanstalk environment should already be created and running.

  • The environment must be using a managed platform (e.g., Amazon Linux, Tomcat, etc.).

Remediation:

Test plan:

Using AWS Console:

  1. Sign in to the AWS Management Console.

  2. Navigate to Elastic Beanstalk under Services.

  3. Select the Elastic Beanstalk environment for which you want to enable managed platform updates.

  4. In the Elastic Beanstalk Console, click Configuration in the left-hand menu.

  5. In the Platform section, click Edit.

  6. Under Platform Updates, select Apply Updates Automatically to enable managed updates.

  7. Set the Update Level (e.g., Minor updates or All updates), depending on your preference.

  8. Save the changes to enable automatic platform updates.

Using AWS CLI:

To check the current update settings for an environment, run:

aws elasticbeanstalk describe-environment-settings --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled

To enable managed platform updates, run:

aws elasticbeanstalk update-environment --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled,Value=true

To verify that updates have been enabled, run:

aws elasticbeanstalk describe-environment-settings --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled

Implementation Steps:

Using AWS Console:

  1. Sign in to the AWS Management Console and navigate to Elastic Beanstalk.

  2. Select the Elastic Beanstalk environment you wish to modify.

  3. Click Configuration from the left menu.

  4. In the Platform section, select Edit.

  5. Under Platform Updates, choose Apply Updates Automatically and select the Update Level.

  6. Save changes and redeploy the environment.

Using AWS CLI:

To enable managed platform updates, run:

aws elasticbeanstalk update-environment --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled,Value=true

To confirm the setting is applied, run:

aws elasticbeanstalk describe-environment-settings --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled

Backout Plan:

Using AWS Console:

  1. If enabling managed platform updates causes any issues (e.g., performance degradation or unexpected changes), navigate back to the Platform section in the Elastic Beanstalk Console.

  2. Click Edit and uncheck the Apply Updates Automatically option.

  3. Save the changes and redeploy the environment.

Using AWS CLI:

If necessary, you can disable managed platform updates by running:

aws elasticbeanstalk update-environment --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled,Value=false

Verify that the updates have been disabled:

aws elasticbeanstalk describe-environment-settings --environment-name <environment-name> --option-settings Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled

Note:

  • Update Scheduling: When enabling managed platform updates, you can specify whether you want updates to occur automatically or during specific time windows. Consider scheduling updates during off-peak hours to minimize disruption.

  • Compatibility: Ensure your application is compatible with the platform updates, especially for major version changes, as these may require additional testing or adjustments.

References:

CIS Controls Mapping:

Version

Control ID

Control Description

IG1

IG2

IG3

v8

6.7

Implement and configure automated management of application platform updates.

v8

6.4

Implement logging and monitoring for critical changes in platform configurations.

v8

6.8

Define and maintain automated patch management processes to ensure timely application of platform updates.